]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Class1: Tolerate carrier up after a valid TCF signal
authorAidan Van Dyk <aidan@ifax.com>
Fri, 11 May 2007 15:06:02 +0000 (15:06 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Fri, 11 May 2007 15:06:02 +0000 (15:06 +0000)
From Lee:
| commit 979beebef863a4b77f88deca030249d31c47d102
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date:   Fri May 4 18:31:56 2007 +0000
|
|   There's really no need to discriminate against a sender who, after
|   sending the TCF signal, keeps the carrier up for a while afterwards.

faxd/Class1Recv.c++

index ceb945ea47483882212d0807f5d44dddcb6fd809..f589cf1e6aeb0089c376a620da06bdf446d615d1 100644 (file)
@@ -417,11 +417,12 @@ Class1Modem::recvTraining()
         * do is read the Eye Quality register (or similar)
         * and derive an indicator of the real S/N ratio.
         */
+       u_int fullrun = params.transferSize(TCF_DURATION);
        u_int minrun = params.transferSize(conf.class1TCFMinRun);
        nonzero = (100*nonzero) / (n == 0 ? 1 : n);
        protoTrace("RECV: TCF %u bytes, %u%% non-zero, %u zero-run",
            n, nonzero, zerorun);
-       if (nonzero > conf.class1TCFMaxNonZero) {
+       if (zerorun < fullrun && nonzero > conf.class1TCFMaxNonZero) {
            protoTrace("RECV: reject TCF (too many non-zero, max %u%%)",
                conf.class1TCFMaxNonZero);
            ok = false;