]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Add Class1PageLengthSupport config option
authorAidan Van Dyk <aidan@ifax.com>
Wed, 14 Mar 2007 18:25:08 +0000 (18:25 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Wed, 14 Mar 2007 18:25:08 +0000 (18:25 +0000)
From Lee's work:
|  commit de0cb2e47f327cea2e639773505f30c46f142cdb
|  Author: Lee Howard <faxguy@howardsilvan.com>
|  Date:   Mon Jun 5 19:12:55 2006 +0000
|
|    this adds Class1PageLengthSupport so that Class 1 modems can configure
|    the LN settings that they want for send+receive
|
|    faxsend wasn't checking modem page length support and therefore sending
|    would always use LN_INF - this buglet should apply to Class 2 as
|    well ... it should be fixed now

CHANGES
faxd/Class1.c++
faxd/FaxSend.c++
faxd/ModemConfig.c++
faxd/ModemConfig.h
man/hylafax-config.4f

diff --git a/CHANGES b/CHANGES
index 9254007bf5c18284f2cfc299fc4d57291a3112d1..020bc3fb386a579bbf4775a1d4ee23c6140aa4ab 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Changelog since HylaFAX 4.3.3
 
+* Add Class1PageLengthSupport config option (12 Mar 2007)
 * Simplify Class1SwitchingCmd code and prevent duplication of the
   command in session (12 Mar 2007)
 * Replace Class1TrainingRecovery with Class1SwitchingCmd
index 0f585f041e986bb368e8798853ddfb29f6acd24f..54e40d2f9685fec6d2b3f6c5ed664ac1a5ccf73d 100644 (file)
@@ -181,7 +181,7 @@ Class1Modem::setupModem(bool isSend)
        modemParams.br |= BIT(primaryV34Rate) - 1;
     }
     modemParams.wd = BIT(WD_A4) | BIT(WD_B4) | BIT(WD_A3);
-    modemParams.ln = LN_ALL;
+    modemParams.ln = conf.class1PageLengthSupport;
     modemParams.df = BIT(DF_1DMH) | BIT(DF_2DMR);
     modemParams.bf = BF_DISABLE;
     modemParams.st = ST_ALL;
index aaacb3ed6c9fd10a17cdae1489d743e053f17544..1f43571e1671c5840c9ebfcab3dd090d9be1f586 100644 (file)
@@ -795,7 +795,7 @@ FaxServer::sendSetupParams1(TIFF* tif,
      * to take into account sloppy coding practice (e.g.
      * using 200 dpi for high-res facsimile.
      */
-    if (clientInfo.getMaxPageLengthInMM() != (u_short)-1) {
+    if (clientInfo.getMaxPageLengthInMM() != (u_short) -1 || !modem->supportsPageLength((u_int) -1)) {
        u_long h = 0;
        (void) TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
        float len = h / yres;                   // page length in mm
index 68f1cb8c6101826b5b8f0fd983e295a285996b16..aae411209f76f5d9bfaf91067d3e70b6bed357f8 100644 (file)
@@ -208,6 +208,7 @@ static struct {
 { "class1tcfminrun",           &ModemConfig::class1TCFMinRun,       (2*TCF_DURATION)/3 },
 { "class1tmconnectdelay",      &ModemConfig::class1TMConnectDelay,  0 },
 { "class1ecmframesize",                &ModemConfig::class1ECMFrameSize,    256 },
+{ "class1pagelengthsupport",   &ModemConfig::class1PageLengthSupport, LN_ALL },
 };
 static struct {
     const char*                 name;
index 4a9fb4f1253bc5cb0fa638d1f934cea3e7875d74..fa704c6fa522f4c6672ae50367e73a4d4839e819 100644 (file)
@@ -161,6 +161,7 @@ public:
     u_int      class1TCFMinRun;        // min length of zero run for TCF check
     u_int      class1TMConnectDelay;   // delay (ms) after +FTM CONNECT
     u_int      class1ECMFrameSize;     // ECM frame size for transmission
+    u_int      class1PageLengthSupport;// page length support
     bool       class1GreyJPEGSupport;  // Greyscale JPEG support
     bool       class1ColorJPEGSupport; // Full-color JPEG support
     bool       class1ECMSupport;       // support T.30-A ECM
index f98cff088771433fe44c036f51d69019316d9295..25819ce075c46b253c0194de5100a1569be6fc45 100644 (file)
@@ -296,6 +296,7 @@ Class1FrameOverhead integer \s-14\s+1       Class 1/1.0: extra bytes in a received \s-
 Class1GreyJPEGSupport  boolean \s-1No\s+1      Class 1/1.0: to enable grey JPEG fax support
 Class1JBIGSupport      string  \s-1\fIsee below\fP\s+1 Class 1/1.0: to enable monochrome JBIG fax support
 Class1NFLOCmd  string  \-      Class 1/1.0: command to set no flow control
+Class1PageLengthSupport        integer \s-17\s+1       Class 1/1.0: coded value for modem page length support
 Class1RecvAbortOK      integer \s-1200\s+1     Class 1/1.0: max wait (ms) for ``\s-1OK\s+1'' after recv abort
 Class1RecvIdentTimer   integer \s-140000\s+1   Class 1/1.0: max wait (ms) for initial ident frame
 Class1RMPersistence    integer \s-12\s+1       Class 1/1.0: times to attempt high-speed carrier recv
@@ -2351,6 +2352,11 @@ This command is issued immediately after sending the
 .B Class1Cmd
 to switch the modem to Class 1 operation.
 .TP
+.B Class1PageLengthSupport
+The coded value for page lengths supported by the modem.  The only
+correct values and meanings are these: ``1'', A4 page length; ``3'', both 
+A4 and B4 page length; ``7'', unlimited page length.
+.TP
 .B Class1PPMWaitCmd
 The command used to stop and wait before sending the post page message,
 except before sending EOP, when