[svn-commits] mnicholson: branch irroot/t38gateway-trunk r325805 - /team/irroot/t38gateway-...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 30 10:35:43 CDT 2011


Author: mnicholson
Date: Thu Jun 30 10:35:39 2011
New Revision: 325805

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=325805
Log:
renamed bridge_start to timeout_start

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=325805&r1=325804&r2=325805
==============================================================================
--- team/irroot/t38gateway-trunk/res/res_fax.c (original)
+++ team/irroot/t38gateway-trunk/res/res_fax.c Thu Jun 30 10:35:39 2011
@@ -256,8 +256,8 @@
 	struct ast_fax_session *s;
 	/*! reserved fax session token */
 	struct ast_fax_tech_token *token;
-	/*! the start of the bridge */
-	struct timeval bridge_start;
+	/*! the start of our timeout counter */
+	struct timeval timeout_start;
 	/*! DSP Processor*/
 	struct ast_dsp *chan_dsp;
 	struct ast_dsp *peer_dsp;
@@ -2469,8 +2469,8 @@
 		return -1;
 	}
 
-	gateway->bridge_start.tv_sec = 0;
-	gateway->bridge_start.tv_usec = 0;
+	gateway->timeout_start.tv_sec = 0;
+	gateway->timeout_start.tv_usec = 0;
 
 	report_fax_status(chan, details, "FAX Transmission In Progress");
 
@@ -2522,7 +2522,7 @@
 			}
 
 			gateway->t38_state = T38_STATE_NEGOTIATING;
-			gateway->bridge_start = ast_tvnow();
+			gateway->timeout_start = ast_tvnow();
 
 			ast_debug(1, "detected CED tone on %s, requesting T.38 on %s for T.38 gateway session\n", active->name, other->name);
 			return dfr;
@@ -2588,7 +2588,7 @@
 			ast_debug(1, "%s is attempting to negotiate T.38 with %s, we'll see what happens\n", active->name, other->name);
 			t38_parameters_ast_to_fax(&details->their_t38_parameters, control_params);
 			gateway->t38_state = T38_STATE_UNKNOWN;
-			gateway->bridge_start = ast_tvnow();
+			gateway->timeout_start = ast_tvnow();
 			ao2_ref(details, -1);
 			return f;
 		} else if (state == T38_STATE_UNAVAILABLE || state == T38_STATE_REJECTED) {
@@ -2626,7 +2626,7 @@
 
 			t38_parameters_ast_to_fax(&details->their_t38_parameters, control_params);
 			gateway->t38_state = T38_STATE_UNKNOWN;
-			gateway->bridge_start = ast_tvnow();
+			gateway->timeout_start = ast_tvnow();
 
 			ast_debug(1, "%s is attempting to negotiate T.38 after we already sent a negotiation request based on CED detection\n", active->name);
 			ao2_ref(details, -1);
@@ -2852,7 +2852,7 @@
 			return f;
 		}
 
-		gateway->bridge_start = ast_tvnow();
+		gateway->timeout_start = ast_tvnow();
 
 		/* we are bridged, change r/w formats to SLIN for CED detection and T.30 */
 		ast_format_copy(&gateway->chan_read_format, &chan->readformat);
@@ -2871,8 +2871,8 @@
 		gateway->bridged = 1;
 	}
 
-	if (gateway->bridged && !ast_tvzero(gateway->bridge_start)) {
-		if (ast_tvdiff_ms(ast_tvnow(), gateway->bridge_start) > FAX_GATEWAY_TIMEOUT) {
+	if (gateway->bridged && !ast_tvzero(gateway->timeout_start)) {
+		if (ast_tvdiff_ms(ast_tvnow(), gateway->timeout_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->framehook);
 			gateway->s->details->gateway_id = -1;




More information about the svn-commits mailing list