summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2011-05-06 20:02:31 +0000
committerRussell Bryant <russell@russellbryant.com>2011-05-06 20:02:31 +0000
commit33b7cc2ef6e686637e0c3d294ee90b5e2e7dd7e1 (patch)
treea398fd1feb52d3d77650139b0b90e75c1aaaf940
parentae8dbde4a8bd3b622fe88ce57f9a90032a0f94e6 (diff)
Merged revisions 317867 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r317867 | russell | 2011-05-06 15:01:16 -0500 (Fri, 06 May 2011) | 10 lines chan_sip: Destroy variables on a sip_pvt before copying vars from the sip_peer. Don't duplicate variables on the sip_pvt. Just reset the variable list each time. (closes issue #19202) Reported by: wdoekes Patches: issue19202_destroy_challenged_invite_chanvars.patch uploaded by wdoekes (license 717) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index eeff8905a..36866baa5 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15582,7 +15582,8 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of,
ast_string_field_set(p, authname, peer->name);
if (sipmethod == SIP_INVITE) {
- /* copy channel vars */
+ /* destroy old channel vars and copy in new ones. */
+ ast_variables_destroy(p->chanvars);
p->chanvars = copy_vars(peer->chanvars);
}