]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fixed issue where junk T.38 received after a FAX exchange is totally completed
authorSteve Underwood <steveu@coppice.org>
Sat, 4 Feb 2012 12:33:06 +0000 (20:33 +0800)
committerSteve Underwood <steveu@coppice.org>
Sat, 4 Feb 2012 12:33:06 +0000 (20:33 +0800)
s not simply ignored.

libs/spandsp/src/t38_terminal.c

index 836210ca9f76f095c2abe02e87123f8f5ac2351b..427997cac28c7a3d23762e2328339e9ea5f5443b 100644 (file)
@@ -234,6 +234,10 @@ static int process_rx_indicator(t38_core_state_t *t, void *user_data, int indica
     s = (t38_terminal_state_t *) user_data;
     fe = &s->t38_fe;
 
+    /* Protect against T.38 stuff arriving after we've actually finished. */
+    if (fe->current_rx_type == T30_MODEM_DONE)
+        return 0;
+
     if (t->current_rx_indicator == indicator)
     {
         /* This is probably due to the far end repeating itself, or slipping
@@ -332,6 +336,11 @@ static int process_rx_data(t38_core_state_t *t, void *user_data, int data_type,
 
     s = (t38_terminal_state_t *) user_data;
     fe = &s->t38_fe;
+
+    /* Protect against T.38 stuff arriving after we've actually finished. */
+    if (fe->current_rx_type == T30_MODEM_DONE)
+        return 0;
+
     /* In termination mode we don't care very much what the data type is apart from a couple of
        special cases. */
     switch (data_type)