[asterisk-commits] mnicholson: branch irroot/t38gateway-1.8 r334072 - /team/irroot/t38gateway-1....

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 31 11:32:45 CDT 2011


Author: mnicholson
Date: Wed Aug 31 11:32:41 2011
New Revision: 334072

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=334072
Log:
only alter the gateway_timeout when attching the gateway to a channel

ASTERISK-18219

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

Modified: team/irroot/t38gateway-1.8/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/res/res_fax.c?view=diff&rev=334072&r1=334071&r2=334072
==============================================================================
--- team/irroot/t38gateway-1.8/res/res_fax.c (original)
+++ team/irroot/t38gateway-1.8/res/res_fax.c Wed Aug 31 11:32:41 2011
@@ -3820,19 +3820,22 @@
 		const char *val = ast_skip_blanks(value);
 		char *timeout = strchr(val, ',');
 
-		details->gateway_timeout = 0;
 		if (timeout) {
-			unsigned int gwtimeout;
 			*timeout++ = '\0';
-			if (sscanf(timeout, "%u", &gwtimeout) == 1) {
-				details->gateway_timeout = gwtimeout * 1000;
-			} else {
-				ast_log(LOG_WARNING, "Unsupported timeout '%s' passed to FAXOPT(%s).\n", timeout, data);
-			}
 		}
 
 		if (ast_true(val)) {
 			if (details->gateway_id < 0) {
+				details->gateway_timeout = 0;
+				if (timeout) {
+					unsigned int gwtimeout;
+					if (sscanf(timeout, "%u", &gwtimeout) == 1) {
+						details->gateway_timeout = gwtimeout * 1000;
+					} else {
+						ast_log(LOG_WARNING, "Unsupported timeout '%s' passed to FAXOPT(%s).\n", timeout, data);
+					}
+				}
+
 				details->gateway_id = fax_gateway_attach(chan, details);
 				if (details->gateway_id < 0) {
 					ast_log(LOG_ERROR, "Error attaching T.38 gateway to channel %s.\n", chan->name);




More information about the asterisk-commits mailing list