[asterisk-commits] rmudgett: branch 1.8 r369327 - /branches/1.8/main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 25 10:57:32 CDT 2012


Author: rmudgett
Date: Mon Jun 25 10:57:28 2012
New Revision: 369327

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369327
Log:
Fix Bridge application occasionally returning to the wrong location.

* Fix do_bridge_masquerade() getting the resume location from the zombie
channel.  The code must not touch a clone channel after it has masqueraded
it.  The clone channel has become a zombie and is starting to hangup.

(closes issue ASTERISK-19985)
Reported by: jamicque
Patches:
      jira_asterisk_19985_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: jamicque

Modified:
    branches/1.8/main/features.c

Modified: branches/1.8/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/features.c?view=diff&rev=369327&r1=369326&r2=369327
==============================================================================
--- branches/1.8/main/features.c (original)
+++ branches/1.8/main/features.c Mon Jun 25 10:57:28 2012
@@ -6813,8 +6813,15 @@
  */
 static int do_bridge_masquerade(struct ast_channel *chan, struct ast_channel *tmpchan)
 {
+	const char *context;
+	const char *exten;
+	int priority;
+
 	ast_moh_stop(chan);
 	ast_channel_lock_both(chan, tmpchan);
+	context = ast_strdupa(chan->context);
+	exten = ast_strdupa(chan->exten);
+	priority = chan->priority;
 	ast_setstate(tmpchan, chan->_state);
 	tmpchan->readformat = chan->readformat;
 	tmpchan->writeformat = chan->writeformat;
@@ -6828,7 +6835,7 @@
 	ast_do_masquerade(tmpchan);
 
 	/* when returning from bridge, the channel will continue at the next priority */
-	ast_explicit_goto(tmpchan, chan->context, chan->exten, chan->priority + 1);
+	ast_explicit_goto(tmpchan, context, exten, priority + 1);
 
 	return 0;
 }




More information about the asterisk-commits mailing list