From: Aidan Van Dyk Date: Wed, 14 Mar 2007 18:31:19 +0000 (+0000) Subject: Handle situation when sender is not using ECM after negotiating it. X-Git-Tag: HYLAFAX-4_4_0BETA1~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa8d380e9f5ff28a5d0dfcfde358260a2beea50d;p=thirdparty%2FHylaFAX.git Handle situation when sender is not using ECM after negotiating it. From Lee: | commit de49a7b7b5dc5a2b704ef844fe90053d568dd0b8 | Author: Lee Howard | Date: Thu Jun 29 16:27:15 2006 +0000 | | handle instances where the sender transmits MPS/EOP/EOM after a bunch of | garbage ECM data - indicating that the sender is not using ECM ... even | though we appear to have negotiated it --- diff --git a/CHANGES b/CHANGES index 1cb95d50..a1ef623d 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Changelog since HylaFAX 4.3.3 +* Handle instances where ECM is negotiated but the sender + transmits non-ECM data and signalling (12 Mar 2007) * Handle MPS/EOP/EOM/CRP when expecting DCS, i.e. after RTN * Log correctly when a receiver DIS indicates no V.8 bit but V.8 was already known to have succeeded (12 Mar 2007) diff --git a/faxd/Class1Recv.c++ b/faxd/Class1Recv.c++ index ea8fe5cb..a489dffd 100644 --- a/faxd/Class1Recv.c++ +++ b/faxd/Class1Recv.c++ @@ -737,7 +737,22 @@ Class1Modem::recvPage(TIFF* tif, u_int& ppm, fxStr& emsg, const fxStr& id) if (!getRecvEOLCount()) { // We have a null page, don't save it because it makes readers fail. pageGood = false; - if (params.ec != EC_DISABLE) return (false); + if (params.ec != EC_DISABLE) { + if (emsg == "") { + /* + * We negotiated ECM, got no valid ECM image data, and the + * ECM page reception routines did not set an error message. + * The empty emsg is due to the ECM routines detecting a + * non-ECM-specific partial-page signal and wants it to + * be handled here. The sum total of all of this, and the + * fact that we got MPS/EOP/EOM tells us that the sender + * is not using ECM. In an effort to salvage the session we'll + * disable ECM now and try to continue. + */ + params.ec = EC_DISABLE; + } else + return (false); + } } if (!pageGood && conf.badPageHandling == FaxModem::BADPAGE_RTN) recvResetPage(tif);