From owner-freebsd-ports-bugs@FreeBSD.ORG Sun May 26 09:30:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5217C211 for ; Sun, 26 May 2013 09:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 349DBFD8 for ; Sun, 26 May 2013 09:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r4Q9U1U1011026 for ; Sun, 26 May 2013 09:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r4Q9U1rt011025; Sun, 26 May 2013 09:30:01 GMT (envelope-from gnats) Resent-Date: Sun, 26 May 2013 09:30:01 GMT Resent-Message-Id: <201305260930.r4Q9U1rt011025@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, "r4721@tormail.org" Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4AD7FFB2 for ; Sun, 26 May 2013 09:22:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.FreeBSD.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id 3E017FAD for ; Sun, 26 May 2013 09:22:06 +0000 (UTC) Received: from oldred.FreeBSD.org ([127.0.1.6]) by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r4Q9LuLQ030692 for ; Sun, 26 May 2013 09:21:56 GMT (envelope-from nobody@oldred.FreeBSD.org) Received: (from nobody@localhost) by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r4Q9Luxi030691; Sun, 26 May 2013 09:21:56 GMT (envelope-from nobody) Message-Id: <201305260921.r4Q9Luxi030691@oldred.FreeBSD.org> Date: Sun, 26 May 2013 09:21:56 GMT From: "r4721@tormail.org" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/178987: [patch] fix printing failure in print/cups-client X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2013 09:30:01 -0000 >Number: 178987 >Category: ports >Synopsis: [patch] fix printing failure in print/cups-client >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 26 09:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: r4721@tormail.org >Release: >Organization: >Environment: >Description: when a connection to the print server is established over tcp and times out after 5 minutes of inactivity, printing after this will silently fail. most applications only initiate the connection when the print dialog is opened, but libreoffice opens it on startup so it is most noticable there as a failure to print after it has been open for > 5 minutes without printing. new file: print/cups-base/files/patch-client-reconnect this is a backported patch from cups 1.6 which fixes the issue. it should be deleted once the port is updated to 1.6. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: print/cups-base/files/patch-client-reconnect =================================================================== --- print/cups-base/files/patch-client-reconnect (revision 0) +++ print/cups-base/files/patch-client-reconnect (working copy) @@ -0,0 +1,28 @@ +--- cups/request.c ++++ cups/request.c +@@ -1004,6 +1004,25 @@ + httpClose(cg->http); + cg->http = NULL; + } ++ else ++ { ++ /* ++ * Same server, see if the connection is still established... ++ */ ++ ++ char ch; /* Connection check byte */ ++ ++ if (recv(cg->http->fd, &ch, 1, MSG_PEEK | MSG_DONTWAIT) < 0 && ++ errno != EWOULDBLOCK) ++ { ++ /* ++ * Nope, close the connection... ++ */ ++ ++ httpClose(cg->http); ++ cg->http = NULL; ++ } ++ } + } + + /* >Release-Note: >Audit-Trail: >Unformatted: