[asterisk-commits] mnicholson: branch irroot/t38gateway-trunk r324619 - /team/irroot/t38gateway-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 23 09:50:52 CDT 2011


Author: mnicholson
Date: Thu Jun 23 09:50:48 2011
New Revision: 324619

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=324619
Log:
use gateway->framehook instead of details->gateway_id in some cases

Modified:
    team/irroot/t38gateway-trunk/res/res_fax.c

Modified: team/irroot/t38gateway-trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-trunk/res/res_fax.c?view=diff&rev=324619&r1=324618&r2=324619
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_fax.c (original)
+++ team/irroot/t38gateway-trunk/res/res_fax.c Thu Jun 23 09:50:48 2011
@@ -2516,8 +2516,7 @@
 
 	if (!(details = find_details(chan))) {
 		ast_log(LOG_ERROR, "no FAX session details found on chan %s for T.38 gateway session, odd\n", chan->name);
-		ast_framehook_detach(chan, details->gateway_id);
-		details->gateway_id = -1;
+		ast_framehook_detach(chan, gateway->framehook);
 		return f;
 	}
 
@@ -2720,7 +2719,7 @@
 		/* don't start a gateway if neither channel can handle T.38 */
 		if (ast_channel_get_t38_state(chan) == T38_STATE_UNAVAILABLE && ast_channel_get_t38_state(peer) == T38_STATE_UNAVAILABLE) {
 			ast_debug(1, "not starting gateway for %s and %s; neither channel supports T.38\n", chan->name, peer->name);
-			ast_framehook_detach(chan, gateway->s->details->gateway_id);
+			ast_framehook_detach(chan, gateway->framehook);
 			gateway->s->details->gateway_id = -1;
 			return f;
 		}
@@ -2747,7 +2746,7 @@
 	if (gateway->bridged && !ast_tvzero(gateway->bridge_start)) {
 		if (ast_tvdiff_ms(ast_tvnow(), gateway->bridge_start) > FAX_GATEWAY_TIMEOUT) {
 			ast_debug(1, "no fax activity between %s and %s after %d ms, disabling gateway\n", chan->name, peer->name, FAX_GATEWAY_TIMEOUT);
-			ast_framehook_detach(chan, gateway->s->details->gateway_id);
+			ast_framehook_detach(chan, gateway->framehook);
 			gateway->s->details->gateway_id = -1;
 			return f;
 		}




More information about the asterisk-commits mailing list