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.2@70551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2
Joshua Colp 18 years ago
parent a1cc9b4966
commit 6357ad5659

@ -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);

Loading…
Cancel
Save