[asterisk-commits] tilghman: trunk r357436 - in /trunk: ./ apps/app_stack.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 28 15:26:37 CST 2012


Author: tilghman
Date: Tue Feb 28 15:26:34 2012
New Revision: 357436

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=357436
Log:
Correctly reset the dialplan priority.

When the stack frame is allocated, we save the address to which we should
return, when the Gosub returns.  However, if we just want to restore the
priority, then we need to subtract 1 before setting it.  Otherwise, when
a Gosub goes to a nonexistent address, it will skip a priority in the
dialplan.  This is because when we return from an application, the PBX
increments the priority for us.
........

Merged revisions 357416 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 357421 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/apps/app_stack.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_stack.c?view=diff&rev=357436&r1=357435&r2=357436
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Tue Feb 28 15:26:34 2012
@@ -421,7 +421,7 @@
 				ast_channel_context(chan), ast_channel_exten(chan), ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan));
 		ast_channel_context_set(chan, newframe->context);
 		ast_channel_exten_set(chan, newframe->extension);
-		ast_channel_priority_set(chan, newframe->priority);
+		ast_channel_priority_set(chan, newframe->priority - 1);
 		ast_free(newframe);
 		return -1;
 	}




More information about the asterisk-commits mailing list