[asterisk-commits] tilghman: branch 10 r357421 - in /branches/10: ./ apps/app_stack.c

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


Author: tilghman
Date: Tue Feb 28 15:21:14 2012
New Revision: 357421

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=357421
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

Modified:
    branches/10/   (props changed)
    branches/10/apps/app_stack.c

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

Modified: branches/10/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_stack.c?view=diff&rev=357421&r1=357420&r2=357421
==============================================================================
--- branches/10/apps/app_stack.c (original)
+++ branches/10/apps/app_stack.c Tue Feb 28 15:21:14 2012
@@ -421,7 +421,7 @@
 				chan->context, chan->exten, ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP) ? chan->priority + 1 : chan->priority);
 		ast_copy_string(chan->context, newframe->context, sizeof(chan->context));
 		ast_copy_string(chan->exten, newframe->extension, sizeof(chan->exten));
-		chan->priority = newframe->priority;
+		chan->priority = newframe->priority - 1;
 		ast_free(newframe);
 		return -1;
 	}




More information about the asterisk-commits mailing list