]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Added a warning message to spandsp's fax_decode program when it looks like
authorSteve Underwood <steveu@coppice.org>
Tue, 3 Oct 2017 14:33:07 +0000 (15:33 +0100)
committerSteve Underwood <steveu@coppice.org>
Tue, 3 Oct 2017 14:33:07 +0000 (15:33 +0100)
the FAX machines are entering a proprietary mode.

libs/spandsp/tests/fax_decode.c

index 327ae0fdd6de3764a69a8f941b4861b5d5242d61..9f6a474b0d0af2be51892e6ea137c57a53a32efa 100644 (file)
@@ -153,7 +153,9 @@ static void print_frame(const char *io, const uint8_t *fr, int frlen)
     /*endif*/
     fprintf(stderr, "%s %s:", io, t30_frametype(fr[2]));
     for (i = 2;  i < frlen;  i++)
+    {
         fprintf(stderr, " %02x", fr[i]);
+    }
     /*endfor*/
     fprintf(stderr, "\n");
     type = fr[2] & 0xFE;
@@ -182,6 +184,11 @@ static void print_frame(const char *io, const uint8_t *fr, int frlen)
             /*endif*/
         }
         /*endif*/
+        if (type == T30_NSS  ||  type == T30_NSC)
+        {
+            fprintf(stderr, "WARNING: The FAX machines may be switching into a proprietary mode, which this software cannot decode\n");
+        }
+        /*endif*/
     }
     /*endif*/
 }