]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Class1: Don't look for Phase C again after EOP
authorAidan Van Dyk <aidan@ifax.com>
Wed, 26 Sep 2007 12:54:20 +0000 (12:54 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Wed, 26 Sep 2007 12:54:20 +0000 (12:54 +0000)
From Lee:
| commit a688967f7bade3f10f88b046cc5c7339d2b42216
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date:   Mon Aug 27 17:29:29 2007 +0000
|
|   If it's an EOP then we don't want to go looking for Phase C again.
|
|   If we got a CONNECT after AT+FRM=n then we don't want to think that it's
|   a quick PPM turnaround thing.

faxd/Class1Recv.c++

index 46c2cc4b3d84752d3e58b4f19fe87f7b6172deee..fa2ef6ae94ab74dccc41b44e0e698d16db34960b 100644 (file)
@@ -534,6 +534,7 @@ Class1Modem::recvPage(TIFF* tif, u_int& ppm, Status& eresult, const fxStr& id)
     gotCONNECT = true;
 
     do {
+       ATResponse rmResponse = AT_NOTHING;
        long timer = conf.t2Timer;
        if (!messageReceived) {
            if (sendCFR ) {
@@ -543,7 +544,7 @@ Class1Modem::recvPage(TIFF* tif, u_int& ppm, Status& eresult, const fxStr& id)
            pageGood = pageStarted = false;
            resetLineCounts();          // in case we don't make it to initializeDecoder
            recvSetupTIFF(tif, group3opts, FILLORDER_LSB2MSB, id);
-           ATResponse rmResponse = AT_NOTHING;
+           rmResponse = AT_NOTHING;
            if (params.ec != EC_DISABLE || useV34) {
                pageGood = recvPageData(tif, eresult);
                messageReceived = true;
@@ -901,7 +902,7 @@ Class1Modem::recvPage(TIFF* tif, u_int& ppm, Status& eresult, const fxStr& id)
                        return (false);
                    }
                    signalRcvd = 0;
-                   if (params.ec == EC_DISABLE && !getRecvEOLCount() && (Sys::now() - lastMCF < 9)) {
+                   if (params.ec == EC_DISABLE && rmResponse != AT_CONNECT && !getRecvEOLCount() && (Sys::now() - lastMCF < 9)) {
                        /*
                         * We last transmitted MCF a very, very short time ago, received no image data
                         * since then, and now we're seeing a PPM again.  In non-ECM mode the chances of 
@@ -911,7 +912,7 @@ Class1Modem::recvPage(TIFF* tif, u_int& ppm, Status& eresult, const fxStr& id)
                         */
                        (void) transmitFrame(FCF_MCF|FCF_RCVR);
                        traceFCF("RECV send", FCF_MCF);
-                       messageReceived = false;        // expect Phase C
+                       messageReceived = (lastPPM != FCF_MPS); // expect Phase C if MPS
                    } else {
                        u_int rtnfcf = FCF_RTN;
                        if (!getRecvEOLCount() || conf.badPageHandling == FaxModem::BADPAGE_DCN) {