]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If devicestate is passed a port number strip it out.
authorJoshua Colp <jcolp@digium.com>
Wed, 10 Oct 2007 14:42:00 +0000 (14:42 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 10 Oct 2007 14:42:00 +0000 (14:42 +0000)
(closes issue #10930)
Reported by: ibc

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

channels/chan_sip.c

index 9cf7fa47a1a27ae578fa7082d97589829ebe9cfc..ee983cae1ed767321d41f5b0b3286ffdda4df540 100644 (file)
@@ -15630,6 +15630,9 @@ static int sip_devicestate(void *data)
                }
                ASTOBJ_UNREF(p,sip_destroy_peer);
        } else {
+               char *port = strchr(host, ':');
+               if (port)
+                       *port = '\0';
                hp = ast_gethostbyname(host, &ahp);
                if (hp)
                        res = AST_DEVICE_UNKNOWN;