]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Page sent protocol trace fixes
authorAidan Van Dyk <aidan@ifax.com>
Fri, 24 Jul 2009 21:37:14 +0000 (17:37 -0400)
committerPatrice Fournier <pfournier@ifax.com>
Fri, 31 Jul 2009 16:10:49 +0000 (12:10 -0400)
If skipped pages are not counted, make sure to not trace skipped pages as
faxed and to use the same page number for sent pages as in the tagline.
(cherry picked from commit 9ffba03b5ba4f41999b6231c6a1850ccffcad8aa)

faxd/FaxSend.c++

index c5e97c3af46e6f762eed555a2af9dcb8f8f0dd71..0c94942b51b0230b57940b3168fd60f69d758ea1 100644 (file)
@@ -898,17 +898,24 @@ FaxServer::notifyPageSent(FaxRequest& req, const char*, PageType pt)
     }
     req.writeQFile();                  // update q file for clients
     u_short tpages = req.totpages;
+    u_short npages = req.npages;
+
     if (! modem->isCountingSkippedPages() )
+    {
        tpages -= req.skippages;
+       npages -= req.nskip;
+    }
 
-    traceProtocol("SEND FAX (%s): FROM %s TO %s (page %u of %u sent in %s)"
-       , (const char*) req.commid
-       , (const char*) req.mailaddr
-       , (const char*) req.external
-       , req.npages
-       , tpages
-       , fmtTime(now - pageStart)
-    );
+    if (pt != FaxModem::PAGE_SKIP || modem->isCountingSkippedPages())
+       traceProtocol("SEND FAX (%s): FROM %s TO %s (page %u of %u[%u,%u,%u,%u]  sent in %s)"
+           , (const char*) req.commid
+           , (const char*) req.mailaddr
+           , (const char*) req.external
+           , npages
+           , tpages
+           , req.npages, req.totpages, req.nskip, req.skippages
+           , fmtTime(now - pageStart)
+       );
     pageStart = now;                   // for next page
 }