]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't overwrite the configured username setting upon a REGISTER. (issue #8565 reporte...
authorJoshua Colp <jcolp@digium.com>
Wed, 20 Jun 2007 22:20:16 +0000 (22:20 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 20 Jun 2007 22:20:16 +0000 (22:20 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70551 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index afc412aa882d18b1e5e4307ec6bdb58c33fc6cef..804d5fb188273480b23d06afbd21adaa40c3c815 100644 (file)
@@ -6144,10 +6144,8 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st
                memcpy(&p->addr, &pvt->recv, sizeof(p->addr));
        }
 
-       if (c)  /* Overwrite the default username from config at registration */
+       if (c && ast_strlen_zero(p->username))
                ast_copy_string(p->username, c, sizeof(p->username));
-       else
-               p->username[0] = '\0';
 
        if (p->expire > -1) {
                ast_sched_del(sched, p->expire);