[asterisk-commits] irroot: trunk r338951 - in /trunk: ./ res/res_fax.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 3 04:49:42 CDT 2011
Author: irroot
Date: Mon Oct 3 04:49:38 2011
New Revision: 338951
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=338951
Log:
Merged revisions 338950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
........
r338950 | irroot | 2011-10-03 11:37:59 +0200 (Mon, 03 Oct 2011) | 14 lines
Fixup a race condition in res_fax.c where FAXOPT(gateway)=no will
turn off the gateway but the framehook is not destroyed.
this problem happens when a gateway is attempted in the dialplan and
the device is not available i may want to do fax to mail in the server
it will not be allowed.
instead of checking only AST_FAX_TECH_GATEWAY also check gateway_id
Reverts 338904
Fix some white space.
........
Modified:
trunk/ (props changed)
trunk/res/res_fax.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_fax.c?view=diff&rev=338951&r1=338950&r2=338951
==============================================================================
--- trunk/res/res_fax.c (original)
+++ trunk/res/res_fax.c Mon Oct 3 04:49:38 2011
@@ -1650,7 +1650,7 @@
ast_string_field_set(details, error, "INIT_ERROR");
set_channel_variables(chan, details);
- if (details->caps & AST_FAX_TECH_GATEWAY) {
+ if ((details->caps & AST_FAX_TECH_GATEWAY) && (details->gateway_id > 0)) {
ast_string_field_set(details, resultstr, "can't receive a fax on a channel with a T.38 gateway");
set_channel_variables(chan, details);
ast_log(LOG_ERROR, "executing ReceiveFAX on a channel with a T.38 Gateway is not supported\n");
@@ -2120,7 +2120,7 @@
ast_string_field_set(details, error, "INIT_ERROR");
set_channel_variables(chan, details);
- if (details->caps & AST_FAX_TECH_GATEWAY) {
+ if ((details->caps & AST_FAX_TECH_GATEWAY) && (details->gateway_id > 0)) {
ast_string_field_set(details, resultstr, "can't send a fax on a channel with a T.38 gateway");
set_channel_variables(chan, details);
ast_log(LOG_ERROR, "executing SendFAX on a channel with a T.38 Gateway is not supported\n");
@@ -2842,8 +2842,6 @@
ast_channel_make_compatible(chan, peer);
}
}
-
- details->caps &= ~AST_FAX_TECH_GATEWAY;
ao2_ref(details, -1);
return NULL;
@@ -3673,7 +3671,7 @@
}
ast_cli_register_multiple(fax_cli, ARRAY_LEN(fax_cli));
- res = ast_custom_function_register(&acf_faxopt);
+ res = ast_custom_function_register(&acf_faxopt);
fax_logger_level = ast_logger_register_level("FAX");
return res;
More information about the asterisk-commits
mailing list