[svn-commits] tilghman: branch 1.8 r357416 - /branches/1.8/apps/app_stack.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Feb 28 15:19:43 CST 2012


Author: tilghman
Date: Tue Feb 28 15:19:39 2012
New Revision: 357416

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

Modified:
    branches/1.8/apps/app_stack.c

Modified: branches/1.8/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_stack.c?view=diff&rev=357416&r1=357415&r2=357416
==============================================================================
--- branches/1.8/apps/app_stack.c (original)
+++ branches/1.8/apps/app_stack.c Tue Feb 28 15:19:39 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 svn-commits mailing list