]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 569: ignore garbage after sending TCF data when waiting for the OK result
authorLee Howard <faxguy@howardsilvan.com>
Fri, 27 Aug 2004 03:47:46 +0000 (03:47 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Fri, 27 Aug 2004 03:47:46 +0000 (03:47 +0000)
CHANGES
faxd/Class1.c++

diff --git a/CHANGES b/CHANGES
index 2fa12dc36e4c71f671e51070798cb374f178aa76..8f8714f885c625dd1543422084cb197ff57fd1c5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Changelog for HylaFAX 4.2.1
 
+* ignore garbage after sending TCF data (26 Aug 2004)
 * fix truncation of filenames in faxcron (26 Aug 2004)
 * add configure support for libtiff 3.7 (25 Aug 2004)
 * extend short send-HDLC timeouts (18 Aug 2004)
index b97d99493bde93dcd2476890103d709e78721aee..1f91a01b29feef82f0404764d1f1d291e2983eaa 100644 (file)
@@ -1234,8 +1234,14 @@ Class1Modem::transmitData(int br, u_char* data, u_int cc,
        // This delay will vary depending on the modem's adherence to T.31.
        pause(conf.class1TMConnectDelay);
 
-       ok = (sendClass1Data(data, cc, bitrev, eod) &&
-           (eod ? waitFor(AT_OK) : true));
+       ok = sendClass1Data(data, cc, bitrev, eod);
+       if (ok && eod) {
+           ok = false;
+           u_short attempts = 0;
+           while (!ok && attempts++ < 3) {
+               ok = waitFor(AT_OK, 60*1000);   // wait up to 60 seconds for "OK"
+           }
+       }
     }
     if (flowControl == FLOW_XONXOFF)
        setXONXOFF(FLOW_NONE, FLOW_NONE, ACT_DRAIN);