mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Set ARGC in subroutines with the number of arguments passed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -118,8 +118,6 @@ static int frame_set_var(struct ast_channel *chan, struct gosub_stack_frame *fra | ||||
|  | ||||
| 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 @@ static int gosub_exec(struct ast_channel *chan, void *data) | ||||
| 		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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user