aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorlawrance <lawrance@FreeBSD.org>2005-10-08 16:22:41 +0800
committerlawrance <lawrance@FreeBSD.org>2005-10-08 16:22:41 +0800
commit40c4245db933569ed804a58844a970c46d793df7 (patch)
treec721a86aa47b679947adb62b80d633a8ee98c400 /comms
parenta1738e8bf334299ba245e98559819ff1962a6e61 (diff)
downloadfreebsd-ports-gnome-40c4245db933569ed804a58844a970c46d793df7.tar.gz
freebsd-ports-gnome-40c4245db933569ed804a58844a970c46d793df7.tar.zst
freebsd-ports-gnome-40c4245db933569ed804a58844a970c46d793df7.zip
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
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);