]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 77: fix case where V.8 handshaking occurs but DIS signal contains no ECM bit
authorLee Howard <faxguy@howardsilvan.com>
Fri, 21 May 2004 19:20:00 +0000 (19:20 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Fri, 21 May 2004 19:20:00 +0000 (19:20 +0000)
faxd/Class1Send.c++

index 8b9827517d64eb41d0879d777f9521bed14077d2..9e1e9c38e0a66318ae1bf2a00cdafe11536d3493 100644 (file)
@@ -159,6 +159,10 @@ Class1Modem::getPrologue(Class2Params& params, bool& hasDoc, fxStr& emsg, u_int&
                    xinfo = frame.getXINFO();
                    params.setFromDIS(dis, xinfo);
                    curcap = NULL;                      // force initial setup
+                   if (useV34 && params.ec == EC_DISABLE) {
+                       protoTrace("V.34-Fax session, but DIS signal contains no ECM bit; ECM forced.");
+                       params.ec = EC_ENABLE256;
+                   }
                    break;
                }
            } while (frame.moreFrames() && recvFrame(frame, conf.t2Timer));
@@ -738,6 +742,10 @@ Class1Modem::sendTraining(Class2Params& params, int tries, fxStr& emsg)
                         * It will work if old dis 'less' then newDIS.
                         */
                        curcap = NULL;
+                       if (useV34 && params.ec == EC_DISABLE) {
+                           protoTrace("V.34-Fax session, but DIS signal contains no ECM bit; ECM forced.");
+                           params.ec = EC_ENABLE256;
+                       }
                      }
                    }
                    return (sendTraining(params, --tries, emsg));