mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Initialize FAXOPT() status variables in sendfax and receivefax instead of when the details structure is created.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@280909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -387,9 +387,6 @@ static struct ast_fax_session_details *session_details_new(void) | ||||
| 	d->modems = general_options.modems; | ||||
| 	d->minrate = general_options.minrate; | ||||
| 	d->maxrate = general_options.maxrate; | ||||
| 	ast_string_field_set(d, result, "FAILED"); | ||||
| 	ast_string_field_set(d, resultstr, "error starting fax session"); | ||||
| 	ast_string_field_set(d, error, "INIT_ERROR"); | ||||
|  | ||||
| 	return d; | ||||
| } | ||||
| @@ -1390,6 +1387,10 @@ static int receivefax_exec(struct ast_channel *chan, const char *data) | ||||
| 		return -1; | ||||
| 	} | ||||
|  | ||||
| 	ast_string_field_set(details, result, "FAILED"); | ||||
| 	ast_string_field_set(details, resultstr, "error starting fax session"); | ||||
| 	ast_string_field_set(details, error, "INIT_ERROR"); | ||||
|  | ||||
| 	set_channel_variables(chan, details); | ||||
|  | ||||
| 	if (ast_strlen_zero(data)) { | ||||
| @@ -1795,6 +1796,9 @@ static int sendfax_exec(struct ast_channel *chan, const char *data) | ||||
| 		return -1; | ||||
| 	} | ||||
|  | ||||
| 	ast_string_field_set(details, result, "FAILED"); | ||||
| 	ast_string_field_set(details, resultstr, "error starting fax session"); | ||||
| 	ast_string_field_set(details, error, "INIT_ERROR"); | ||||
| 	set_channel_variables(chan, details); | ||||
|  | ||||
| 	if (ast_strlen_zero(data)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user