[asterisk-commits] mnicholson: branch 10 r333716 - /branches/10/res/res_fax_spandsp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 29 13:23:01 CDT 2011


Author: mnicholson
Date: Mon Aug 29 13:22:58 2011
New Revision: 333716

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=333716
Log:
It is possible for the gateway to be attached when the channel is still
negotiating T.38. This change handles that case.

Modified:
    branches/10/res/res_fax_spandsp.c

Modified: branches/10/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/res/res_fax_spandsp.c?view=diff&rev=333716&r1=333715&r2=333716
==============================================================================
--- branches/10/res/res_fax_spandsp.c (original)
+++ branches/10/res/res_fax_spandsp.c Mon Aug 29 13:22:58 2011
@@ -683,6 +683,13 @@
 		ast_channel_unlock(s->chan);
 		return -1;
 	}
+
+	/* we can be in T38_STATE_NEGOTIATING or T38_STATE_NEGOTIATED when the
+	 * gateway is started. We treat both states the same. */
+	if (p->ast_t38_state == T38_STATE_NEGOTIATING) {
+		p->ast_t38_state = T38_STATE_NEGOTIATED;
+	}
+
 	ast_activate_generator(p->ast_t38_state == T38_STATE_NEGOTIATED ? peer : s->chan, &t30_gen , s);
 
 	set_logging(&p->t38_gw_state.logging, s->details);




More information about the asterisk-commits mailing list