]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Class2: Handle subparamaters whem modem supports JP but doesn't show it
authorAidan Van Dyk <aidan@ifax.com>
Mon, 26 Nov 2007 14:03:05 +0000 (14:03 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Mon, 26 Nov 2007 14:03:05 +0000 (14:03 +0000)
From Lee:
| commit 81c1f31536a8cd7d999c4548874b73ff2cdf013f
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date:   Fri Oct 26 15:45:36 2007 +0000
|
|     Apparently some modems support JP but don't show it sometimes.

faxd/Class2.c++

index a176339113af075206d78dc21d7c4400567dc17c..bbe1740f772b95194b3c674879514c2a9fcdf6a2 100644 (file)
@@ -414,7 +414,14 @@ Class2Modem::parseClass2Capabilities(const char* cap, Class2Params& params, bool
            &params.df, &params.ec, &params.bf, &params.st);
        params.jp = 0;
     }
-    if ((useJP && n == 9) || (!useJP && n == 8)) {
+    if ((useJP && n == 9) || (n == 8)) {
+       if (useJP && (n == 8)) {
+           /*
+            * The modem was previously determined to support JP; however,
+            * this response does not include it.  So we just set it to zero.
+            */
+           params.jp = 0;
+       }
        if (params.ec != EC_DISABLE && (conf.class2ECMType == ClassModem::ECMTYPE_CLASS20 ||
           (conf.class2ECMType == ClassModem::ECMTYPE_UNSET && serviceType != SERVICE_CLASS2)))
            params.ec += 1;             // simple adjustment, drops EC_ENABLE64