*/
if (++ntrys == 3) {
emsg = "Ringback detected, no answer without CED"; // XXX
+ protoTrace(emsg);
return (NOFCON);
}
break;
*/
if (!atCmd(cmd == FCF_MPS ? conf.class1PPMWaitCmd : conf.class1EOPWaitCmd, AT_OK)) {
emsg = "Stop and wait failure (modem on hook)";
+ protoTrace(emsg);
return (send_retry);
}
}
if (morePages) {
if (ppr == FCF_PIP) {
emsg = "Procedure interrupt (operator intervention)";
+ protoTrace(emsg);
return (send_failed);
}
if (!TIFFReadDirectory(tif)) {
emsg = "Problem reading document directory";
+ protoTrace(emsg);
return (send_failed);
}
FaxSendStatus status =
break;
case FCF_DCN: // disconnect, abort
emsg = "Remote fax disconnected prematurely";
+ protoTrace(emsg);
return (send_retry);
case FCF_RTN: // nak, retry after retraining
switch( conf.rtnHandling ){
ntrys = 0;
if (ppr == FCF_PIP) {
emsg = "Procedure interrupt (operator intervention)";
+ protoTrace(emsg);
return (send_failed);
}
if (morePages) {
if (!TIFFReadDirectory(tif)) {
emsg = "Problem reading document directory";
+ protoTrace(emsg);
return (send_failed);
}
FaxSendStatus status =
case RTN_GIVEUP:
emsg = "Unable to transmit page"
" (giving up after RTN)";
+ protoTrace(emsg);
return (send_failed); // "over and out"
}
// case RTN_RETRANSMIT
if (++ntrys >= 3) {
emsg = "Unable to transmit page"
" (giving up after 3 attempts)";
+ protoTrace(emsg);
return (send_retry);
}
if (!dropToNextBR(next)) {
emsg = "Unable to transmit page"
" (NAK at all possible signalling rates)";
+ protoTrace(emsg);
return (send_retry);
}
morePages = true; // retransmit page
case FCF_PIN: // nak, retry w/ operator intervention
emsg = "Unable to transmit page"
" (NAK with operator intervention)";
+ protoTrace(emsg);
return (send_failed);
case FCF_CRP:
break;
default: // unexpected abort
emsg = "Fax protocol error (unknown frame received)";
+ protoTrace(emsg);
return (send_retry);
}
} while (frame.getFCF() == FCF_CRP && ++ncrp < 3);
if (ncrp == 3) {
emsg = "Fax protocol error (command repeated 3 times)";
+ protoTrace(emsg);
return (send_retry);
}
} while (morePages);
{
if (tries == 0) {
emsg = "DIS/DTC received 3 times; DCS not recognized";
+ protoTrace(emsg);
return (false);
}
u_int dcs = params.getDCS(); // NB: 24-bit DCS and
*/
if (!atCmd(conf.class1TCFWaitCmd, AT_OK)) {
emsg = "Stop and wait failure (modem on hook)";
+ protoTrace(emsg);
return (send_retry);
}
fxStr tmCmd(curcap[HasShortTraining(curcap)].value, tmCmdFmt);
if (!atCmd(tmCmd, AT_CONNECT)) {
emsg = "Unable to establish message carrier";
+ protoTrace(emsg);
return (false);
}
// As with TCF, T.31 8.3.3 requires the DCE to report CONNECT at the beginning
if (flowControl == FLOW_XONXOFF)
setXONXOFF(FLOW_NONE, FLOW_NONE, ACT_DRAIN);
}
- if (!rc && (emsg == ""))
+ if (!rc && (emsg == "")) {
emsg = "Unspecified Transmit Phase C error"; // XXX
+ protoTrace(emsg);
+ }
return (rc);
}