ports/178987: [patch] fix printing failure in print/cups-client
r4721 at tormail.org
r4721 at tormail.org
Sun May 26 09:30:01 UTC 2013
>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 at 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:
More information about the freebsd-ports-bugs
mailing list