]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 656: add Retransmit-Ignore RTNHandlingMethod
authorLee Howard <faxguy@howardsilvan.com>
Tue, 27 Sep 2005 18:23:03 +0000 (18:23 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Tue, 27 Sep 2005 18:23:03 +0000 (18:23 +0000)
CHANGES
faxd/Class1Send.c++
faxd/Class2Send.c++
faxd/FaxModem.h
faxd/ModemConfig.c++
man/hylafax-config.4f

diff --git a/CHANGES b/CHANGES
index ffb740166608243c41d10609c4a2c9a4e0beaee5..0012fa2a2151c8c7b20af01235eb6615854cc31a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 #      $Id$    
 
+Changelog for HylaFAX
+
+* add Retransmit-Ignore RTNHandlingMethod (27 Sep 2005)
+
 Changelog for HylaFAX 4.2.2
 
 * fix error of confirming an ECM block missing frames other
index a7f1c574b6f87807b1cc0484d6aaf2f187aa8b76..2b233c914e58f52a994698120fd85186f5c45baa 100644 (file)
@@ -427,6 +427,8 @@ Class1Modem::sendPhaseB(TIFF* tif, Class2Params& next, FaxMachineInfo& info,
                return (send_retry);
            case FCF_RTN:               // nak, retry after retraining
                 switch( conf.rtnHandling ){
+               case RTN_RETRANSMITIGNORE:
+                   if (ntrys < 2) break;
                 case RTN_IGNORE:
                        // ignore error and try to send next page
                        // after retraining
index 0cdd6fd4407f8bda6370d787d39f5fac533a6435..42f4855aec94363eccf686a400e92956d3580758 100644 (file)
@@ -321,6 +321,8 @@ Class2Modem::sendPhaseB(TIFF* tif, Class2Params& next, FaxMachineInfo& info,
                    break;
                case PPR_RTN:           // page bad, retrain requested
                     switch( conf.rtnHandling ){
+                   case RTN_RETRANSMITIGNORE:
+                       if (ntrys < 2) break;
                     case RTN_IGNORE:
                         goto ignore; // ignore error and trying to send next page
                     case RTN_GIVEUP:
index 8ff3f197033e8bf3d0a7f5b88b28446d06090016..768b56a01abc76b13b21c1bb945f33d4b208fa5b 100644 (file)
@@ -168,7 +168,8 @@ public:
     enum {                     // FaxModem::RTNHandling
         RTN_RETRANSMIT = 0,         // retransmit page after RTN until MCF/MPS
         RTN_GIVEUP     = 1,         // immediately abort
-        RTN_IGNORE     = 2          // ignore error and send next page
+        RTN_IGNORE     = 2,         // ignore error and send next page
+        RTN_RETRANSMITIGNORE = 3    // retransmit but ignore error instead of hanging up
     };
 
     virtual ~FaxModem();
index 1f58659d0cbcd255d1ba560c5880b59e10bb8524..b9af66ec139ec60b13cba02bdbd45fd23f998574 100644 (file)
@@ -254,7 +254,7 @@ ModemConfig::setupConfig()
     class1ValidateV21Frames = false;           // assume the modem does this
     setVolumeCmds("ATM0 ATL0M1 ATL1M1 ATL2M1 ATL3M1");
     recvDataFormat     = DF_ALL;               // default to no transcoding
-    rtnHandling         = FaxModem::RTN_RETRANSMIT; // retransmit until MCF/MPS
+    rtnHandling         = FaxModem::RTN_RETRANSMITIGNORE; // retransmit until MCF/MPS
     saveUnconfirmedPages = true;               // keep unconfirmed pages
     softRTFCC          = true;                 // real-time fax comp. conv. (software)
     noAnswerVoice      = false;                // answer voice calls
@@ -540,7 +540,7 @@ ModemConfig::findRTNHandling(const char* cp, RTNHandling& rh)
         { "RETRANSMIT", FaxModem::RTN_RETRANSMIT },
         {     "GIVEUP", FaxModem::RTN_GIVEUP },
         {     "IGNORE", FaxModem::RTN_IGNORE },
-        {  "H_POLLACK", FaxModem::RTN_IGNORE }, // inventor's name as an alias :-)
+        { "RETRANSMIT-IGNORE", FaxModem::RTN_RETRANSMITIGNORE }
     };
     for (u_int i = 0; i < N(rhnames); i++)
         if (valeq(cp, rhnames[i].name)) {
@@ -555,8 +555,8 @@ ModemConfig::getRTNHandling(const char* cp)
 {
     RTNHandling rh;
     if (!findRTNHandling(cp, rh)) {
-        configError("Unknown RTN handling method \"%s\", using RETRANSMIT", cp);
-        rh = FaxModem::RTN_RETRANSMIT;   // default
+        configError("Unknown RTN handling method \"%s\", using RETRANSMIT-IGNORE", cp);
+        rh = FaxModem::RTN_RETRANSMITIGNORE;   // default
     }
     return (rh);
 }
index b34941479555e1db0323cf4dca76f2429d9a737e..2afe36f5b56b5065506758db1f0db7becb465ad6 100644 (file)
@@ -198,7 +198,7 @@ RingFax     string  \-      distinctive ring fax call identifier
 RingsBeforeAnswer      integer \s-10\s+1       rings to wait before answering phone
 RingTimeout    integer \s-16000\s+1    timeout in ms after RING before reset
 RingVoice      string  \-      distinctive ring voice call identifier
-RTNHandlingMethod      string  \s-1Retransmit\s+1      RTN signal handling method      
+RTNHandlingMethod      string  \s-1Retransmit-Ignore\s+1       RTN signal handling method      
 SaveUnconfirmedPages   boolean \s-1true\s+1    save or delete unconfirmed pages
 SendFaxCmd\(S1 string  \s-1bin/faxsend\s+1     fax transmit command script
 SendPageCmd\(S1        string  \s-1bin/pagesend\s+1    pager transmit command script
@@ -1316,27 +1316,43 @@ and
 .BR RingFax .
 .TP
 .B RTNHandlingMethod
-Specifies how to react to RTN signal, received from the remote;
-one of ``\s-1Retransmit\s+1'', ``\s-1Giveup\s+1'' and
-``\s-1Ignore\s+1''. ``\s-1Retransmit\s+1'' assumes that the
-page is not sent succesfully if RTN signal has been received.
-HylaFAX will make up to 2 additional attempts to send the page,
-decreasing signalling rate and retraining. If RTN is still there,
-it will place up to 2 additional calls. So if the remote always respond with
-RTN, the page will be send 9 times. Although this algorithm comply with
-T.30 specs and was originally implemented by Sam Leffler as the only
-possible choice, real fax machines behave completely different. There is a
-non-written rule among fax developers, that RTN means ``over and out'' -- hang
-up immediately and never try to send the same page to the same destination
-again. That is because RTN usually indicates problems with flow control,
-incorrectly encoded T.4 data, incompatibility between local and remote
-equipment etc., but very rarely is caused by the real noise on the line.
-This ``over and out'' behaviour can be activated by ``Giveup'' value.
-There is also third option, not so radical as ``Giveup''. Yes, we will never
-retransmit the page, but we can try to send the next page, and let the
-remote to decide what to do (accept our decision or hang up). Thus one page will
-(or will not) be missed but we have a chance to successfully send all other pages.
-This behaviour can be activated by ``Ignore'' value.
+Specifies how to react to an RTN signal received from the remote:
+one of ``\s-1Retransmit\s+1'', ``\s-1Giveup\s+1'',``\s-1Ignore\s+1'',
+or ``\s-1Retransmit-Ignore\s+1''.
+
+``\s-1Retransmit\s+1'' assumes that the page is not received succesfully.
+HylaFAX will make up to two additional attempts to send the page,
+decreasing signalling rate and retraining.  If RTN continues,
+up to 2 additional calls will be placed.  The downside is that if the remote
+always responds with RTN, the page will be sent 9 times and no following
+pages will be sent.  Many fax machines will not behave this way, although 
+T.30 specification seems clear that this is the intent of the RTN signal.
+
+Many fax machines will interpret RTN as meaning to not send the same data
+again.  That is because RTN may indicate problems with flow control,
+incorrectly encoded T.4 data, or some incompatibility other than line noise.
+Fax machines that interpret RTN this way will disconnect and require a manual
+retransmission.  This ``over and out'' behaviour can be activated by the 
+``\s-1Giveup\s+1'' value.  The advantage to this behavior is that the same
+page of image data will not be sent multiple times, but the downside is that
+the following pages will not be sent.
+
+``\s-1Ignore\s+1'' is similar to ``\s-1Giveup\s+1'' in that it makes the
+assumption the data cannot be automatically accepted by the receiver.  However,
+rather than disconnecting the page of image data is abandoned and processing moves
+on to the next.  The remote is left to decide what to do with the unacceptable
+page of image data.  The downside to this behavior, is that the remote may or may
+not have kept the page, depending on its interpretation of the RTN signal - but
+it does allow us to continue on to the next page.
+
+``\s-1Retransmit-Ignore\s+1'' is a combination of ``\s-1Retransmit\s+1'' and
+``\s-1Ignore\s+1''.  The page of image data is retransmitted up to two additional
+times, but rather than disconnecting after a third RTN signal for the same page, 
+processing then continues on to the next page.  This approach is an effort to
+satisfy both interpretations of an RTN signal.  It allows the receiver to hopefully
+receive a better copy of the image data while not failing to send subsequent pages.
+If the receiver saves or prints a copy of pages for which it transmits RTN, then it
+could save or print up to three copies of every page.
 .TP
 .B SaveUnconfirmedPages
 Whether or not to save a received facsimile image page if the sender disconnects