diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-29 21:07:21 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-29 21:07:21 +0000 |
commit | e628d26c9591bdd0b53fc608ff3eb6069ee5eddf (patch) | |
tree | 2441d2dbbcbaab49be03d03c7ac752542edc84e5 /res | |
parent | ae12cef58d7e4d89446ebffb6b076306ddeac8e6 (diff) |
Fix regression introduced in r1664. Give the fax stack time to shutdown and populate the FAXOPT output variables.
FAX-222
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@280557 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_fax.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/res/res_fax.c b/res/res_fax.c index ecabbd90e..03fd128a7 100644 --- a/res/res_fax.c +++ b/res/res_fax.c @@ -811,12 +811,17 @@ static void set_channel_variables(struct ast_channel *chan, struct ast_fax_sessi pbx_builtin_setvar_helper(chan, "FAXPAGES", buf); } -#define GENERIC_FAX_EXEC_ERROR_QUIET(fax, chan, errorstr, reason) \ +#define GENERIC_FAX_EXEC_SET_VARS(fax, chan, errorstr, reason) \ do { \ ast_string_field_set(fax->details, result, S_OR(fax->details->result, "FAILED")); \ ast_string_field_set(fax->details, resultstr, S_OR(fax->details->resultstr, reason)); \ ast_string_field_set(fax->details, error, S_OR(fax->details->error, errorstr)); \ set_channel_variables(chan, fax->details); \ + } while (0) + +#define GENERIC_FAX_EXEC_ERROR_QUIET(fax, chan, errorstr, reason) \ + do { \ + GENERIC_FAX_EXEC_SET_VARS(fax, chan, errorstr, reason); \ res = ms = -1; \ } while (0) @@ -1053,7 +1058,7 @@ static int generic_fax_exec(struct ast_channel *chan, struct ast_fax_session_det * send the FAX stack silence so the modems can finish their session without * any problems */ ast_log(LOG_NOTICE, "Channel '%s' did not return a frame; probably hung up.\n", chan->name); - GENERIC_FAX_EXEC_ERROR_QUIET(fax, chan, "HANGUP", "remote end hungup"); + GENERIC_FAX_EXEC_SET_VARS(fax, chan, "HANGUP", "remote channel hungup"); c = NULL; chancount = 0; timeout -= (1000 - ms); |