[svn-commits] qwell: trunk r102500 - /trunk/main/pbx.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Feb 5 14:51:50 CST 2008


Author: qwell
Date: Tue Feb  5 14:51:50 2008
New Revision: 102500

URL: http://svn.digium.com/view/asterisk?view=rev&rev=102500
Log:
Change where priority of a goto is adjusted.
Partially reverts 102272.

Closes issue #11929
(credit to file for fix suggestion - we still <3 you)

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=102500&r1=102499&r2=102500
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Feb  5 14:51:50 2008
@@ -5853,8 +5853,12 @@
 		ast_copy_string(chan->context, context, sizeof(chan->context));
 	if (!ast_strlen_zero(exten))
 		ast_copy_string(chan->exten, exten, sizeof(chan->exten));
-	if (priority > -1)
+	if (priority > -1) {
 		chan->priority = priority;
+		/* see flag description in channel.h for explanation */
+		if (ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP))
+			chan->priority--;
+	}
 
 	ast_channel_unlock(chan);
 
@@ -5868,7 +5872,7 @@
 	ast_channel_lock(chan);
 
 	if (chan->pbx) { /* This channel is currently in the PBX */
-		ast_explicit_goto(chan, context, exten, priority);
+		ast_explicit_goto(chan, context, exten, priority + 1);
 		ast_softhangup_nolock(chan, AST_SOFTHANGUP_ASYNCGOTO);
 	} else {
 		/* In order to do it when the channel doesn't really exist within




More information about the svn-commits mailing list