Date: Sun, 28 Aug 2005 17:35:19 +0930 (CST) From: Phil Kernick <philk@rotfl.com.au> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/85368: port comms/hylafax won't send faxes under FreeBSD5 Message-ID: <20050828080519.AE68F45430@mail.rotfl.com.au> Resent-Message-ID: <200508280810.j7S8ANhF013789@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 85368 >Category: ports >Synopsis: port comms/hylafax won't send faxes under FreeBSD5 >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 28 08:10:22 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Phil Kernick >Release: FreeBSD 5.4-RELEASE-p6 i386 >Organization: >Environment: System: FreeBSD catbert.rotfl.com.au 5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6 #0: Mon Aug 15 13:12:48 CST 2005 root@catbert.rotfl.com.au:/usr/src/sys/i386/compile/CATBERT i386 >Description: The HylaFax port (comms/hylafax) won't send Class 1 faxes under FreeBSD5.4. The sendfax program segfaults. >How-To-Repeat: Install the port, try to send a fax, then look in /var/log/messages for lines like: Aug 28 17:03:37 catbert FaxQueuer[56995]: JOB 18: Send program terminated abnormally with exit status 0xb >Fix: Apply this patch, which back-ports the fixes for Class 1 sending from the current development release of HylaFax into 4.2.1. --- Class1Send.c++.orig Wed Dec 29 12:46:46 2004 +++ Class1Send.c++ Sun Aug 28 00:02:14 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); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050828080519.AE68F45430>