[svn-commits] mnicholson: branch 10 r334064 - /branches/10/res/res_fax.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 31 11:31:04 CDT 2011


Author: mnicholson
Date: Wed Aug 31 11:31:00 2011
New Revision: 334064

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

ASTERISK-18219

Modified:
    branches/10/res/res_fax.c

Modified: branches/10/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/res/res_fax.c?view=diff&rev=334064&r1=334063&r2=334064
==============================================================================
--- branches/10/res/res_fax.c (original)
+++ branches/10/res/res_fax.c Wed Aug 31 11:31:00 2011
@@ -3548,19 +3548,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 svn-commits mailing list