summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorSam Lawrance <lawrance@FreeBSD.org>2005-10-08 08:22:41 +0000
committerSam Lawrance <lawrance@FreeBSD.org>2005-10-08 08:22:41 +0000
commitf19c2031f78905b7d70c131bd93e65c292f0386e (patch)
tree1c20dff7e30ed588b8b4edcdc6f440cd53b6d0e1 /comms
parentMASTER_SITES_REDHAT_LINUX: (diff)
Backport a patch from Hylafax CVS which fixes a problem sending faxes on 5.x.
Bump PORTREVISION. PR: ports/85368 Submitted by: Phil Kernick <philk@rotfl.com.au> Approved by: tdv94ped@cs.umu.se (maintainer, timeout) Obtained from: Hylafax CVS
Notes
Notes: svn path=/head/; revision=144559
Diffstat (limited to 'comms')
-rw-r--r--comms/hylafax/Makefile2
-rw-r--r--comms/hylafax/files/patch-faxd_Class1Send.c++61
2 files changed, 62 insertions, 1 deletions
diff --git a/comms/hylafax/Makefile b/comms/hylafax/Makefile
index b7283886f92a..e20eb737b994 100644
--- a/comms/hylafax/Makefile
+++ b/comms/hylafax/Makefile
@@ -7,7 +7,7 @@
PORTNAME= hylafax
PORTVERSION= 4.2.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= comms
MASTER_SITES= ftp://ftp.hylafax.org/source/
diff --git a/comms/hylafax/files/patch-faxd_Class1Send.c++ b/comms/hylafax/files/patch-faxd_Class1Send.c++
new file mode 100644
index 000000000000..944a3823194c
--- /dev/null
+++ b/comms/hylafax/files/patch-faxd_Class1Send.c++
@@ -0,0 +1,61 @@
+--- faxd/Class1Send.c++.orig Sat Oct 8 18:06:03 2005
++++ faxd/Class1Send.c++ Sat Oct 8 18:06:47 2005
+@@ -270,6 +270,8 @@
+ HDLCFrame frame(conf.class1FrameOverhead);
+
+ do {
++ hadV34Trouble = false; // to monitor failure type
++ batchingError = false;
+ signalRcvd = 0;
+ if (abortRequested())
+ return (send_failed);
+@@ -320,8 +322,6 @@
+ /*
+ * Transmit the facsimile message/Phase C.
+ */
+- hadV34Trouble = false; // to monitor failure type
+- batchingError = false;
+ if (!sendPage(tif, params, decodePageChop(pph, params), cmd, emsg)) {
+ if (hadV34Trouble) {
+ protoTrace("The destination appears to have trouble with V.34-Fax.");
+@@ -913,6 +913,7 @@
+ ecmBlock[ecmBlockPos++] = ecmFrame[i];
+ ecmFramePos = 0;
+ if (frameNumber == 256 || lastframe) {
++ fxAssert(frameNumber <= 256, "Invalid frameNumber value.");
+ ecmBlockPos = 0;
+ bool lastblock = lastframe;
+
+@@ -1145,7 +1146,7 @@
+ }
+ }
+ }
+- } while (!gotppr && (++ppscnt < 3) && (crpcnt < 3));
++ } while (!gotppr && (++ppscnt < 3) && (crpcnt < 3) && !(useV34 && gotEOT));
+ if (gotppr) {
+ if (!useV34 && !atCmd(conf.class1SwitchingCmd, AT_OK)) {
+ emsg = "Failure to receive silence.";
+@@ -1485,9 +1486,11 @@
+ return (false);
+ }
+ }
+- if (eod && (ecmFramePos != 0)) {
+- while (ecmFramePos < (frameSize + 4))
+- ecmFrame[ecmFramePos++] = 0x00;
++ if (eod) {
++ if (ecmFramePos != 0) {
++ // frame must be filled to end with zero-data
++ while (ecmFramePos < (frameSize + 4)) ecmFrame[ecmFramePos++] = 0x00;
++ }
+ if (!blockFrame(bitrev, true, ppmcmd, emsg))
+ return (false);
+ }
+@@ -1631,7 +1634,7 @@
+ }
+
+ bool rc = true;
+- ecmBlockPos = ecmFramePos = ecmBitPos = ecmOnes = ecmByte = 0;
++ frameNumber = ecmBlockPos = ecmFramePos = ecmBitPos = ecmOnes = ecmByte = 0;
+ protoTrace("SEND begin page");
+
+ tstrip_t nstrips = TIFFNumberOfStrips(tif);