From: Joshua Colp Date: Fri, 20 Jul 2007 17:16:48 +0000 (+0000) Subject: (closes issue #10247) X-Git-Tag: 1.2.26.1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7047b7ed560ea0b1c2c419f62e05ba8696f2374;p=thirdparty%2Fasterisk.git (closes issue #10247) Reported by: fkasumovic Patches: chan_sip.patch uploaded by fkasumovic (license #101) Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76080 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index eb8e55baa2..46aec97633 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12519,6 +12519,9 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int ast_variables_destroy(peer->chanvars); peer->chanvars = NULL; } + /* If we have realm authentication information, remove them (reload) */ + clear_realm_authentication(peer->auth); + peer->auth = (struct sip_auth *) NULL; strcpy(peer->context, default_context); strcpy(peer->subscribecontext, default_subscribecontext); strcpy(peer->vmexten, global_vmexten);