Merged revisions 70552 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r70552 | file | 2007-06-20 18:22:20 -0400 (Wed, 20 Jun 2007) | 10 lines

Merged revisions 70551 via svnmerge from 
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/trunk@70553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp 2007-06-20 22:24:47 +00:00
parent 57526b35cc
commit 18f4920227
1 changed files with 1 additions and 3 deletions

View File

@ -8456,10 +8456,8 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st
/* Save SIP options profile */
peer->sipoptions = pvt->sipoptions;
if (!ast_strlen_zero(curi)) /* Overwrite the default username from config at registration */
if (!ast_strlen_zero(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);