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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 27 11:44:55 CDT 2008


Author: tilghman
Date: Mon Oct 27 11:44:55 2008
New Revision: 152174

URL: http://svn.digium.com/view/asterisk?view=rev&rev=152174
Log:
Set ARGC in subroutines with the number of arguments passed.

Modified:
    trunk/apps/app_stack.c

Modified: trunk/apps/app_stack.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_stack.c?view=diff&rev=152174&r1=152173&r2=152174
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Mon Oct 27 11:44:55 2008
@@ -118,8 +118,6 @@
 
 static void gosub_release_frame(struct ast_channel *chan, struct gosub_stack_frame *frame)
 {
-	unsigned char i;
-	char argname[15];
 	struct ast_var_t *vardata;
 
 	/* If chan is not defined, then we're calling it as part of gosub_free,
@@ -287,6 +285,8 @@
 		frame_set_var(chan, newframe, argname, args2.argval[i]);
 		ast_debug(1, "Setting '%s' to '%s'\n", argname, args2.argval[i]);
 	}
+	snprintf(argname, sizeof(argname), "%d", args2.argc);
+	frame_set_var(chan, newframe, "ARGC", argname);
 
 	/* And finally, save our return address */
 	oldlist = stack_store->data;




More information about the asterisk-commits mailing list