[asterisk-commits] mnicholson: branch 1.8 r280909 - /branches/1.8/res/res_fax.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 4 10:11:20 CDT 2010


Author: mnicholson
Date: Wed Aug  4 10:11:13 2010
New Revision: 280909

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=280909
Log:
Initialize FAXOPT() status variables in sendfax and receivefax instead of when the details structure is created.

Modified:
    branches/1.8/res/res_fax.c

Modified: branches/1.8/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_fax.c?view=diff&rev=280909&r1=280908&r2=280909
==============================================================================
--- branches/1.8/res/res_fax.c (original)
+++ branches/1.8/res/res_fax.c Wed Aug  4 10:11:13 2010
@@ -387,9 +387,6 @@
 	d->modems = general_options.modems;
 	d->minrate = general_options.minrate;
 	d->maxrate = general_options.maxrate;
-	ast_string_field_set(d, result, "FAILED");
-	ast_string_field_set(d, resultstr, "error starting fax session");
-	ast_string_field_set(d, error, "INIT_ERROR");
 
 	return d;
 }
@@ -1390,6 +1387,10 @@
 		return -1;
 	}
 
+	ast_string_field_set(details, result, "FAILED");
+	ast_string_field_set(details, resultstr, "error starting fax session");
+	ast_string_field_set(details, error, "INIT_ERROR");
+
 	set_channel_variables(chan, details);
 
 	if (ast_strlen_zero(data)) {
@@ -1795,6 +1796,9 @@
 		return -1;
 	}
 
+	ast_string_field_set(details, result, "FAILED");
+	ast_string_field_set(details, resultstr, "error starting fax session");
+	ast_string_field_set(details, error, "INIT_ERROR");
 	set_channel_variables(chan, details);
 
 	if (ast_strlen_zero(data)) {




More information about the asterisk-commits mailing list