[svn-commits] mnicholson: branch 1.8 r297495 - /branches/1.8/res/res_fax.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Dec 3 09:21:56 CST 2010


Author: mnicholson
Date: Fri Dec  3 09:21:52 2010
New Revision: 297495

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=297495
Log:
Print a DEBUG message instead of a WARNING message when the selected fax tech does not support reserving sessions.

Answer the channel before quering it for t.38 support.  This is necessary for the query to work properly over local channels.

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=297495&r1=297494&r2=297495
==============================================================================
--- branches/1.8/res/res_fax.c (original)
+++ branches/1.8/res/res_fax.c Fri Dec  3 09:21:52 2010
@@ -714,7 +714,7 @@
 	}
 
 	if (!s->tech->reserve_session) {
-		ast_log(LOG_WARNING, "Selected FAX technology module (%s) does not support reserving sessions.\n", s->tech->description);
+		ast_debug(1, "Selected FAX technology module (%s) does not support reserving sessions.\n", s->tech->description);
 		return s;
 	}
 
@@ -1614,14 +1614,6 @@
 		details->option.allow_audio = AST_FAX_OPTFLAG_TRUE;
 	}
 
-	if (set_fax_t38_caps(chan, details)) {
-		ast_string_field_set(details, error, "T38_NEG_ERROR");
-		ast_string_field_set(details, resultstr, "error negotiating T.38");
-		set_channel_variables(chan, details);
-		ao2_ref(details, -1);
-		return -1;
-	}
-
 	if (!(s = fax_session_reserve(details))) {
 		ast_string_field_set(details, resultstr, "error reserving fax session");
 		set_channel_variables(chan, details);
@@ -1640,6 +1632,15 @@
 			ao2_ref(details, -1);
 			return -1;
 		}
+	}
+
+	if (set_fax_t38_caps(chan, details)) {
+		ast_string_field_set(details, error, "T38_NEG_ERROR");
+		ast_string_field_set(details, resultstr, "error negotiating T.38");
+		set_channel_variables(chan, details);
+		ao2_ref(s, -1);
+		ao2_ref(details, -1);
+		return -1;
 	}
 
 	if (details->caps & AST_FAX_TECH_T38) {
@@ -2088,14 +2089,6 @@
 		details->option.request_t38 = AST_FAX_OPTFLAG_TRUE;
 	}
 
-	if (set_fax_t38_caps(chan, details)) {
-		ast_string_field_set(details, error, "T38_NEG_ERROR");
-		ast_string_field_set(details, resultstr, "error negotiating T.38");
-		set_channel_variables(chan, details);
-		ao2_ref(details, -1);
-		return -1;
-	}
-
 	if (!(s = fax_session_reserve(details))) {
 		ast_string_field_set(details, resultstr, "error reserving fax session");
 		set_channel_variables(chan, details);
@@ -2114,6 +2107,15 @@
 			ao2_ref(details, -1);
 			return -1;
 		}
+	}
+
+	if (set_fax_t38_caps(chan, details)) {
+		ast_string_field_set(details, error, "T38_NEG_ERROR");
+		ast_string_field_set(details, resultstr, "error negotiating T.38");
+		set_channel_variables(chan, details);
+		ao2_ref(s, -1);
+		ao2_ref(details, -1);
+		return -1;
 	}
 
 	if (details->caps & AST_FAX_TECH_T38) {




More information about the svn-commits mailing list