Fix typo about maddr (bug #4386)
authorMark Spencer <markster@digium.com>
Thu, 26 May 2005 15:06:24 +0000 (15:06 +0000)
committerMark Spencer <markster@digium.com>
Thu, 26 May 2005 15:06:24 +0000 (15:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5772 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 2af7632..36433f3 100755 (executable)
@@ -3459,7 +3459,7 @@ static void set_destination(struct sip_pvt *p, char *uri)
                maddr += 6;
                hn = strspn(maddr, "0123456789.") + 1;
                if (hn > sizeof(hostname)) hn = sizeof(hostname);
                maddr += 6;
                hn = strspn(maddr, "0123456789.") + 1;
                if (hn > sizeof(hostname)) hn = sizeof(hostname);
-               ast_copy_string(hostname, h, hn);
+               ast_copy_string(hostname, maddr, hn);
        }
        
        hp = ast_gethostbyname(hostname, &ahp);
        }
        
        hp = ast_gethostbyname(hostname, &ahp);