]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 230343 via svnmerge from
authorKevin P. Fleming <kpfleming@digium.com>
Mon, 16 Nov 2009 12:53:16 +0000 (12:53 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Mon, 16 Nov 2009 12:53:16 +0000 (12:53 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r230343 | kpfleming | 2009-11-16 06:51:59 -0600 (Mon, 16 Nov 2009) | 2 lines

  Ensure that only one end of a T.38 session initiates teardown at completion.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@230345 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_fax.c

index 798f879f3b4a5b0c63b04726890ef495591f8a61..424a88741ff542af81ce597e78a32c32db5575b7 100644 (file)
@@ -658,7 +658,11 @@ static int transmit_t38(fax_session *s)
        t38_terminal_release(&t38);
 
 disable_t38:
-       if (ast_channel_get_t38_state(s->chan) == T38_STATE_NEGOTIATED) {
+       /* if we are not the caller, it's our job to shut down the T.38
+        * session when the FAX transmisson is complete.
+        */
+       if ((s->caller_mode == FALSE) &&
+           (ast_channel_get_t38_state(s->chan) == T38_STATE_NEGOTIATED)) {
                if (ast_indicate_data(s->chan, AST_CONTROL_T38_PARAMETERS, &t38_parameters, sizeof(t38_parameters)) == 0) {
                        /* wait up to five seconds for negotiation to complete */
                        unsigned int timeout = 5000;