]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 891: No waiting for DCN after a control channel retrain after the last MCF is...
authorAidan Van Dyk <aidan@ifax.com>
Tue, 16 Sep 2008 19:41:56 +0000 (19:41 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Tue, 16 Sep 2008 19:41:56 +0000 (19:41 +0000)
Lee's patch to handle control channel retrain in recvEnd()

faxd/Class1Recv.c++

index d99e52a8aee1bea6b46245c508548798ca21978f..dd3e2dfb51050312ca0e9b19237acdb67ceec2fe 100644 (file)
@@ -1883,6 +1883,7 @@ Class1Modem::recvEnd(Status& eresult)
         */
        HDLCFrame frame(conf.class1FrameOverhead);
        do {
+           gotRTNC = false;
            if (recvFrame(frame, FCF_RCVR, conf.t2Timer)) {
                traceFCF("RECV recv", frame.getFCF());
                switch (frame.getFCF()) {
@@ -1902,6 +1903,9 @@ Class1Modem::recvEnd(Status& eresult)
                    recvdDCN = true;
                    break;
                }
+           } else if (gotRTNC) {
+               (void) transmitFrame(FCF_MCF|FCF_RCVR);
+               traceFCF("RECV send", FCF_MCF);
            } else if (!wasTimeout() && lastResponse != AT_FCERROR && lastResponse != AT_FRH3) {
                /*
                 * Beware of unexpected responses from the modem.  If