Merged revisions 85280 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 10 Oct 2007 14:43:37 +0000 (14:43 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 10 Oct 2007 14:43:37 +0000 (14:43 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85280 | file | 2007-10-10 11:42:00 -0300 (Wed, 10 Oct 2007) | 4 lines

If devicestate is passed a port number strip it out.
(closes issue #10930)
Reported by: ibc

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85281 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 040f008..7cfb42a 100644 (file)
@@ -16865,6 +16865,9 @@ static int sip_devicestate(void *data)
                }
                unref_peer(p);
        } else {
+               char *port = strchr(host, ':');
+               if (port)
+                       *port = '\0';
                hp = ast_gethostbyname(host, &ahp);
                if (hp)
                        res = AST_DEVICE_UNKNOWN;