]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
[Bug 292] Class 1 sending CRP handling
authorDarren Nickerson <darren.nickerson@ifax.com>
Fri, 24 May 2002 16:32:37 +0000 (16:32 +0000)
committerDarren Nickerson <darren.nickerson@ifax.com>
Fri, 24 May 2002 16:32:37 +0000 (16:32 +0000)
Vyacheslav pointed out that we don't handle the receipt of CRP in Class 1
sending. This patch fixes that. Thanks Lee!

faxd/Class1Send.c++

index 92f678d64f568067e36e176dc68e6fe7b1f243ee..27493f734d7b5257db188f01688689c6182e36d1 100644 (file)
@@ -576,6 +576,7 @@ Class1Modem::sendTraining(Class2Params& params, int tries, fxStr& emsg)
                    protoTrace("TRAINING succeeded");
                    setDataTimeout(60, params.br);
                    return (true);
+               case FCF_CRP:           // command repeat
                case FCF_FTT:           // failure to train, retry
                    break;
                case FCF_DIS:           // new capabilities, maybe
@@ -604,9 +605,10 @@ Class1Modem::sendTraining(Class2Params& params, int tries, fxStr& emsg)
                        emsg = "RSPREC invalid response received";
                    goto done;
                }
+           } else {
+               // delay to give other side time to reset
+               pause(conf.class1TrainingRecovery);
            }
-           // delay to give other side time to reset
-           pause(conf.class1TrainingRecovery);
        } while (--t > 0);
        /*
         * (t) attempts at the current speed failed, drop