[asterisk-commits] irroot: trunk r339464 - in /trunk: ./ res/res_fax.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 5 01:40:44 CDT 2011
Author: irroot
Date: Wed Oct 5 01:40:40 2011
New Revision: 339464
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=339464
Log:
Merged revisions 339463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
........
r339463 | irroot | 2011-10-05 08:28:46 +0200 (Wed, 05 Oct 2011) | 9 lines
Only change the capabilities on the gateway when
the session is been destroyed there is still
a race condition that ends in a segfault.
if the caps are changed the logic in res_fax_spandsp
will run T30 code not gateway code to end the session.
this has been experienced on a "slower" under spec system.
........
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=339464&r1=339463&r2=339464
==============================================================================
--- trunk/res/res_fax.c (original)
+++ trunk/res/res_fax.c Wed Oct 5 01:40:40 2011
@@ -826,6 +826,9 @@
}
if (s->details) {
+ if (s->details->caps & AST_FAX_TECH_GATEWAY) {
+ s->details->caps &= ~AST_FAX_TECH_GATEWAY;
+ }
ao2_ref(s->details, -1);
}
@@ -1704,7 +1707,7 @@
ast_string_field_set(details, error, "INIT_ERROR");
set_channel_variables(chan, details);
- if ((details->caps & AST_FAX_TECH_GATEWAY) && (details->gateway_id > 0)) {
+ if (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");
@@ -2174,7 +2177,7 @@
ast_string_field_set(details, error, "INIT_ERROR");
set_channel_variables(chan, details);
- if ((details->caps & AST_FAX_TECH_GATEWAY) && (details->gateway_id > 0)) {
+ if (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");
@@ -2431,7 +2434,6 @@
if (gateway->s) {
fax_session_release(gateway->s, gateway->token);
gateway->token = NULL;
- gateway->s->details->caps &= ~AST_FAX_TECH_GATEWAY;
ao2_lock(faxregistry.container);
ao2_unlink(faxregistry.container, gateway->s);
More information about the asterisk-commits
mailing list