]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Class1: Handle T.31 protocol properly
authorAidan Van Dyk <aidan@ifax.com>
Wed, 26 Sep 2007 12:57:54 +0000 (12:57 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Wed, 26 Sep 2007 12:57:54 +0000 (12:57 +0000)
From Lee:
| commit 10f930e821ae10cdb5b169c5d6047a516a0c6855
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date:   Fri Aug 24 23:10:09 2007 +0000
|
|   Handle T.31 protocol properly in this rare circumstance.

faxd/Class1Recv.c++

index 5e5f7dd0fb8148001ef5f6a0ca079bfe482f1abd..2f3a4d72718ddead4c869166706ec94d35f37029 100644 (file)
@@ -1664,7 +1664,15 @@ Class1Modem::recvPageECMData(TIFF* tif, const Class2Params& params, Status& eres
                    return (false);
                }
            } else {
-               if (wasTimeout()) abortReceive();
+               if (wasTimeout()) {
+                   abortReceive();
+                   if (!useV34) {
+                       // must now await V.21 signalling
+                       long wait = BIT(curcap->br) & BR_ALL ? 273066 / (curcap->br+1) : conf.t2Timer;
+                       gotRTNC = atCmd(rhCmd, AT_CONNECT, wait);
+                       if (!gotRTNC) syncattempts = 21;
+                   }
+               }
                if (syncattempts++ > 20) {
                    eresult = Status(120, "Cannot synchronize ECM frame reception.");
                    abortPageECMRecv(tif, params, block, fcount, seq, true);