]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 232: distinguish 0 from 1 in PPS signal
authorLee Howard <faxguy@howardsilvan.com>
Thu, 17 Mar 2005 02:44:44 +0000 (02:44 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Thu, 17 Mar 2005 02:44:44 +0000 (02:44 +0000)
CHANGES
faxd/Class1Recv.c++

diff --git a/CHANGES b/CHANGES
index b148c4fd0673cacc8359cb2ff6bdd8ffd36bd021..d8d62745418f549039a7679a3c584d3669e62bf6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Changelog for HylaFAX
 
+* improve identification of ECM blocks with zero frames (16 Mar 2005)
 * fix potential error in ECM reception frame counting (16 Mar 2005)
 * add CRP usage in receiving when message frames
   are received corrupt (14 Mar 2005)
index 474f142753e319e6bf5d4dd04cd02f34a27a4240..c591a9d583732502983bbc346e0f692f7ccaf350 100644 (file)
@@ -974,7 +974,7 @@ Class1Modem::recvPageECMData(TIFF* tif, const Class2Params& params, fxStr& emsg)
                                    tracePPM("RECV recv", rtncframe.getFCF());
                                    if (rtncframe.getLength() > 5) {
                                        u_int fc = frameRev[rtncframe[6]] + 1;
-                                       if (fc == 256 && !dataseen) fc = 0;             // distinguish between 0 and 256
+                                       if ((fc == 256 || fc == 1) && !dataseen) fc = 0;        // distinguish 0 from 1 and 256
                                        if (fcount < fc) fcount = fc;
                                        tracePPM("RECV recv", rtncframe.getFCF2());
                                        protoTrace("RECV received %u frames of block %u of page %u", \
@@ -1262,7 +1262,7 @@ Class1Modem::recvPageECMData(TIFF* tif, const Class2Params& params, fxStr& emsg)
                        case FCF_PPS:
                            {
                                u_int fc = frameRev[ppsframe[6]] + 1;
-                               if (fc == 256 && !dataseen) fc = 0;             // distinguish between 0 and 256
+                               if ((fc == 256 || fc == 1) && !dataseen) fc = 0;        // distinguish 0 from 1 and 256
                                if (fcount < fc) fcount = fc;
                                protoTrace("RECV received %u frames of block %u of page %u", \
                                    fc, frameRev[ppsframe[5]]+1, frameRev[ppsframe[4]]+1);