[asterisk-commits] mnicholson: trunk r334067 - in /trunk: ./ res/res_fax.c

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


Author: mnicholson
Date: Wed Aug 31 11:31:30 2011
New Revision: 334067

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=334067
Log:
Merged revisions 334064 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r334064 | mnicholson | 2011-08-31 11:31:00 -0500 (Wed, 31 Aug 2011) | 4 lines
  
  only alter the gateway_timeout when attching the gateway to a channel
  
  ASTERISK-18219
........

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=334067&r1=334066&r2=334067
==============================================================================
--- trunk/res/res_fax.c (original)
+++ trunk/res/res_fax.c Wed Aug 31 11:31:30 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 asterisk-commits mailing list