]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Fix send buffer when transmitting non-ECM data with a non-zero scanline-time value
authorAidan Van Dyk <aidan@ifax.com>
Wed, 14 Mar 2007 18:35:59 +0000 (18:35 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Wed, 14 Mar 2007 18:35:59 +0000 (18:35 +0000)
From Lee:
|  commit c8555867d1f9c6db83851c08ecf941767c77b356
|  Author: Lee Howard <faxguy@howardsilvan.com>
|  Date:   Wed Apr 19 05:27:12 2006 +0000
|
|    Guilio reported that non-ECM non-0ms sending was using too-small of a buffer
|    This fixes the problem that was introduced with JBIG support.  The problem
|    arises because correctPhaseCData does not decode the full image when using
|    MH or MR data.

CHANGES
faxd/Class1Send.c++
faxd/FaxModem.c++

diff --git a/CHANGES b/CHANGES
index 48edab0160045704134c2ebe3d3cafc9916e6794..cbc11bdea652dda8212397bf1e152da6ee95ce1d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 
 Changelog since HylaFAX 4.3.3
 
+* Fix send buffer when transmitting non-ECM data with a non-zero
+  scanline-time value (13 Mar 2007)
 * Flush modem input after NO CARRIER result in Class 1 Phase C send (13 Mar 2007)
 * Improve sender-side RNR/RR flow control interaction (13 Mar 2007)
 * Don't fallback to V.17 speeds on TCF retransmisions (13 Mar 2007)
index fdffb8f427e7826210072f8304aea17b5b87b328..28dd4505819ad82e299c40157c7d89303ab55d3b 100644 (file)
@@ -1824,8 +1824,12 @@ Class1Modem::sendPage(TIFF* tif, Class2Params& params, u_int pageChop, u_int ppm
 
        /*
         * After a page chop rowsperstrip is no longer valid, as the strip will
-        * be shorter.  Therefore, convertPhaseCData (for the benefit of JBIG) and 
-        * correctPhaseCData deliberately update rowsperstrip.
+        * be shorter.  Therefore, convertPhaseCData (for the benefit of supporting
+        * the sending of JBIG NEWLEN markers) and correctPhaseCData (only in the 
+        * case of MMR data) deliberately update rowsperstrip.  Page-chopped and
+        * un-converted MH and MR data will not have updated rowsperstrip.
+        * However, this only amounts to a allocating more memory than is needed,
+        * and this is not consequential.
         */
 
        if (conf.softRTFCC && params.df != newparams.df) {
index 50a11efc2cf027d99855b9327202bc6d08c79853..1a7f5d798603e3315a20ed3fd33edcec57a57f34 100644 (file)
@@ -768,7 +768,7 @@ FaxModem::correctPhaseCData(u_char* buf, u_long* pBufSize,
         */
        MemoryDecoder dec2(buf, params.pageWidth(), *pBufSize, fillorder, params.is2D(), false);
        endOfData = dec2.cutExtraRTC();
-       rows = dec2.getRows();
+       // we don't update rows because we don't decode the entire image
     }
     if( endOfData )
         *pBufSize = endOfData - buf;