diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-08 14:17:37 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-08 14:17:37 +0000 |
commit | cdea52a3def39e3b06cb2ef6f0ca88a4c5f710a8 (patch) | |
tree | 48745f4484585ee48f6fb473384237c937c54b49 | |
parent | 456644d619a1eddbb4504541d0161ce518541057 (diff) |
Update app_fax for better compatibility with spandsp 0.0.5. Add a call to
t38_terminal_release, and make sure that the phase E handler gets called
with proper status.
(closes issue #13020)
Reported by: dimas
Patches:
v1-appfax.patch uploaded by dimas (license 88)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129006 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_fax.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/app_fax.c b/apps/app_fax.c index cf98cc9a8..675d626a7 100644 --- a/apps/app_fax.c +++ b/apps/app_fax.c @@ -448,9 +448,12 @@ static int transmit_audio(fax_session *s) ast_deactivate_generator(s->chan); - /* Remove phase E handler because we do not want it to be executed - only because we called t30_terminate */ - t30_set_phase_e_handler(&fax.t30_state, NULL, NULL); + /* If we are switching to T38, remove phase E handler. Otherwise it will be executed + by t30_terminate, display diagnostics and set status variables although no transmittion + has taken place yet. */ + if (res > 0) { + t30_set_phase_e_handler(&fax.t30_state, NULL, NULL); + } t30_terminate(&fax.t30_state); fax_release(&fax); @@ -557,11 +560,8 @@ static int transmit_t38(fax_session *s) if (inf) ast_frfree(inf); - /* Remove phase E handler because we do not want it to be executed - only because we called t30_terminate */ - t30_set_phase_e_handler(&t38.t30_state, NULL, NULL); - t30_terminate(&t38.t30_state); + t38_terminal_release(&t38); return res; } |