mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Merged revisions 43803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r43803 | qwell | 2006-09-27 12:44:02 -0700 (Wed, 27 Sep 2006) | 4 lines Fix an issue with PLAYBACKSTATUS not being set under certain circumstances. Fix a minor issue, to make it use the filenames that were parsed, instead of the entire argument string. Fix Background() to return -1 like Playback(), if no args are specified. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -380,6 +380,7 @@ static struct ast_cli_entry cli_playback[] = { | ||||
| static int playback_exec(struct ast_channel *chan, void *data) | ||||
| { | ||||
| 	int res = 0; | ||||
| 	int mres = 0; | ||||
| 	struct ast_module_user *u; | ||||
| 	char *tmp; | ||||
| 	int option_skip=0; | ||||
| @@ -422,11 +423,11 @@ static int playback_exec(struct ast_channel *chan, void *data) | ||||
| 			res = ast_answer(chan); | ||||
| 	} | ||||
| 	if (!res) { | ||||
| 		int mres = 0; | ||||
| 		char *back = args.filenames; | ||||
| 		char *front; | ||||
|  | ||||
| 		ast_stopstream(chan); | ||||
| 		while (!res && (front = strsep(&tmp, "&"))) { | ||||
| 		while (!res && (front = strsep(&back, "&"))) { | ||||
| 			if (option_say) | ||||
| 				res = say_full(chan, front, "", chan->language, NULL, -1, -1); | ||||
| 			else | ||||
| @@ -442,9 +443,9 @@ static int playback_exec(struct ast_channel *chan, void *data) | ||||
| 				mres = 1; | ||||
| 			} | ||||
| 		} | ||||
| 		pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", mres ? "FAILED" : "SUCCESS"); | ||||
| 	} | ||||
| done: | ||||
| 	pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", mres ? "FAILED" : "SUCCESS"); | ||||
| 	ast_module_user_remove(u); | ||||
| 	return res; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user