From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Aug 28 08:10:24 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23B2416A41F for ; Sun, 28 Aug 2005 08:10:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A1B243D48 for ; Sun, 28 Aug 2005 08:10:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7S8AN1c013790 for ; Sun, 28 Aug 2005 08:10:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7S8ANhF013789; Sun, 28 Aug 2005 08:10:23 GMT (envelope-from gnats) Resent-Date: Sun, 28 Aug 2005 08:10:23 GMT Resent-Message-Id: <200508280810.j7S8ANhF013789@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Phil Kernick Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD4B116A41F for ; Sun, 28 Aug 2005 08:05:29 +0000 (GMT) (envelope-from philk@rotfl.com.au) Received: from mail.rotfl.com.au (eth1779.sa.adsl.internode.on.net [150.101.235.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BCAC43D45 for ; Sun, 28 Aug 2005 08:05:28 +0000 (GMT) (envelope-from philk@rotfl.com.au) Received: from localhost (localhost.rotfl.com.au [127.0.0.1]) by mail.rotfl.com.au (Postfix) with ESMTP id E3B024542A for ; Sun, 28 Aug 2005 17:35:26 +0930 (CST) Received: from mail.rotfl.com.au ([127.0.0.1]) by localhost (mail.rotfl.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 45945-02 for ; Sun, 28 Aug 2005 17:35:19 +0930 (CST) Message-Id: <20050828080519.AE68F45430@mail.rotfl.com.au> Date: Sun, 28 Aug 2005 17:35:19 +0930 (CST) From: Phil Kernick To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/85368: port comms/hylafax won't send faxes under FreeBSD5 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Phil Kernick List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Aug 2005 08:10:24 -0000 >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: