flushModemInput();
(void) atCmd("AT", AT_OK, 100);
} else
- (void) waitFor(AT_OK, conf.class1RecvAbortOK);
+ while (!waitFor(AT_OK, conf.class1RecvAbortOK) && lastResponse == AT_OTHER && !wasTimeout());
setTimeout(b); // XXX putModem clobbers timeout state
}
u_int fcount = 0;
u_short syncattempts = 0;
bool blockgood = false, dolongtrain = false;
+ bool gotoPhaseD = false;
do {
sendERR = false;
resetBlock();
signalRcvd = 0;
rcpcnt = 0;
bool dataseen = false;
- if (!useV34) {
+ if (!useV34 && !gotoPhaseD) {
gotRTNC = false;
if (!raiseRecvCarrier(dolongtrain, eresult) && !gotRTNC) {
if (wasTimeout()) {
setInputBuffering(true);
if (flowControl == FLOW_XONXOFF)
(void) setXONXOFF(FLOW_NONE, FLOW_XONXOFF, ACT_FLUSH);
+ gotoPhaseD = false;
if (!sendERR && (useV34 || syncECMFrame())) { // no synchronization needed w/V.34-fax
time_t start = Sys::now();
do {
// 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);
+ gotoPhaseD = gotRTNC;
if (!gotRTNC) syncattempts = 21;
}
}