]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 70551 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 20 Jun 2007 22:22:20 +0000 (22:22 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 20 Jun 2007 22:22:20 +0000 (22:22 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r70551 | file | 2007-06-20 18:20:16 -0400 (Wed, 20 Jun 2007) | 2 lines

Don't overwrite the configured username setting upon a REGISTER. (issue #8565 reported by jsmith)

........

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

channels/chan_sip.c

index d6f513a642ad2202ed43dc96b9fb97da8b3ec0fe..85086d044c8aeb4be4fc5a7e066e4e8d78ee3544 100644 (file)
@@ -7922,10 +7922,8 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st
        /* Save SIP options profile */
        peer->sipoptions = pvt->sipoptions;
 
-       if (curi)       /* Overwrite the default username from config at registration */
+       if (curi && ast_strlen_zero(peer->username))
                ast_copy_string(peer->username, curi, sizeof(peer->username));
-       else
-               peer->username[0] = '\0';
 
        if (peer->expire > -1) {
                ast_sched_del(sched, peer->expire);