[asterisk-commits] mjordan: branch certified-11.6 r423426 - in /certified/branches/11.6: ./ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 18 12:13:39 CDT 2014
Author: mjordan
Date: Thu Sep 18 12:13:36 2014
New Revision: 423426
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=423426
Log:
res_fax_spandsp: Properly handle cleanup before starting FAXes.
If faxing fails at a very early stage, then it is possible for
us to pass a NULL t30 state pointer to spandsp, which spandsp
is none too pleased with.
This patch ensures that we pass the correct pointer to spandsp
in the situation where we have not yet set our local t30 state
pointer.
ASTERISK-24301 #close
Reported by Matt Jordan
Patches:
ASTERISK-24301-fax.diff Uploaded by Mark Michelson (License #5049)
........
Merged revisions 423360 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
certified/branches/11.6/ (props changed)
certified/branches/11.6/res/res_fax_spandsp.c
Propchange: certified/branches/11.6/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: certified/branches/11.6/res/res_fax_spandsp.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/11.6/res/res_fax_spandsp.c?view=diff&rev=423426&r1=423425&r2=423426
==============================================================================
--- certified/branches/11.6/res/res_fax_spandsp.c (original)
+++ certified/branches/11.6/res/res_fax_spandsp.c Thu Sep 18 12:13:36 2014
@@ -177,8 +177,25 @@
static void session_destroy(struct spandsp_pvt *p)
{
struct ast_frame *f;
-
- t30_terminate(p->t30_state);
+ t30_state_t *t30_to_terminate;
+
+ if (p->t30_state) {
+ t30_to_terminate = p->t30_state;
+ } else if (p->ist38) {
+#if SPANDSP_RELEASE_DATE >= 20080725
+ t30_to_terminate = &p->t38_state.t30;
+#else
+ t30_to_terminate = &p->t38_state.t30_state;
+#endif
+ } else {
+#if SPANDSP_RELEASE_DATE >= 20080725
+ t30_to_terminate = &p->fax_state.t30;
+#else
+ t30_to_terminate = &p->fax_state.t30_state;
+#endif
+ }
+
+ t30_terminate(t30_to_terminate);
p->isdone = 1;
ast_timer_close(p->timer);
More information about the asterisk-commits
mailing list