* Class 1.0 modems know to not enable V.34 support if ECM is not
* being used. Hopefully this doesn't interfere with batched faxes.
*/
- Class2Params dis;
- dis.decodePage(fax.pagehandling);
- dis.br = fxmin(modem->getBestSignallingRate(), (u_int) fax.desiredbr);
- dis.ec = (modem->supportsECM() ? fax.desiredec : EC_DISABLE);
- dis.st = fxmax(modem->getBestScanlineTime(), (u_int) fax.desiredst);
- dis.bf = BF_DISABLE;
+ clientParams.decodePage(fax.pagehandling);
+ /*
+ * So we want to restrict DF sellection to those masked in fax.desireddf
+ */
+ clientParams.df = fxmin(modem->getBestDataFormat(), (u_int)fax.desireddf);
+ clientParams.br = fxmin(modem->getBestSignallingRate(), (u_int) fax.desiredbr);
+ clientParams.ec = (modem->supportsECM() ? fax.desiredec : EC_DISABLE);
+ clientParams.st = fxmax(modem->getBestScanlineTime(), (u_int) fax.desiredst);
+ clientParams.bf = BF_DISABLE;
/*
* Force the modem into the appropriate class
* used to send facsimile. We do this before
* requesting polling.
*/
if ((batched & BATCH_FIRST) &&
- !modem->faxService(!clientInfo.getHasV34Trouble() && dis.ec != EC_DISABLE && dis.br > BR_14400)) {
+ !modem->faxService(!clientInfo.getHasV34Trouble() && clientParams.ec != EC_DISABLE && clientParams.br > BR_14400)) {
sendFailed(fax, send_failed, "Unable to configure modem for fax use");
return;
}
sendFailed(fax, send_failed, notice);
return;
}
- if (!modem->sendSetup(fax, dis, notice)) {
+ if (!modem->sendSetup(fax, clientParams, notice)) {
sendFailed(fax, send_failed, notice);
return;
}
* requested. So, RTFCC defeats requested data formatting. :-(
*/
if (class2RTFCC || softRTFCC) {
- params.df = clientCapabilities.df;
+ params.df = fxmin(params.df, clientCapabilities.df);
// even if RTFCC supported uncompressed mode (and it doesn't)
// it's likely that the remote was incorrect in telling us it does
if (params.df == DF_2DMRUNCOMP) params.df = DF_2DMR;
*/
if (req.desireddf == DF_2DMMR && (req.desiredec != EC_DISABLE) &&
use2D && job.modem->supportsMMR() &&
- info.getCalledBefore() && info.getSupportsMMR())
+ (! info.getCalledBefore() || info.getSupportsMMR()) )
params.df = DF_2DMMR;
else if (req.desireddf > DF_1DMH) {
params.df = (use2D && job.modem->supports2D() &&
- info.getCalledBefore() && info.getSupports2DEncoding()) ?
+ (! info.getCalledBefore() || info.getSupports2DEncoding()) ) ?
DF_2DMR : DF_1DMH;
} else
params.df = DF_1DMH;
ai.start = Sys::now();
/*
- * Force any DesiredBR/EC/ST options in the configuration
+ * Force any DesiredDF/BR/EC/ST options in the configuration
* files (i.e. DestControls) to take precedence over
* any user-specified settings. This shouldn't cause
* too many problems, hopefully, since their usage should
* user-specification.
*/
+ if (desiredDF != (u_int) -1)
+ req->desireddf = desiredDF;
if (desiredBR != (u_int) -1)
req->desiredbr = desiredBR;
if (desiredEC != (u_int) -1)
{ "pollrcvdcmd", &faxSendApp::pollRcvdCmd, FAX_POLLRCVDCMD },
};
faxSendApp::numbertag faxSendApp::numbers[] = {
+{ "desireddf", &faxSendApp::desiredDF, (u_int) -1 },
{ "desiredbr", &faxSendApp::desiredBR, (u_int) -1 },
{ "desiredst", &faxSendApp::desiredST, (u_int) -1 },
{ "desiredec", &faxSendApp::desiredEC, (u_int) -1 },
bool ready; // modem ready for use
UUCPLock* modemLock; // uucp lockfile handle
fxStr pollRcvdCmd; // command for docs received by polling
+ u_int desiredDF; // desired data format
u_int desiredBR; // desired signalling rate
u_int desiredST; // desired min-scanline-time
u_int desiredEC; // enable use of ECM if available