aims team mailing list archive
-
aims team
-
Mailing list archive
-
Message #00202
[Bug 1020048] Re: after certain time printing to cups stops working
After reading comment #41 and compare the precise version of cups with
upstream HEAD, I was able to (re-) build the prceise package with the
following patch:
Index: cups-1.5.3/cups/request.c
===================================================================
--- cups-1.5.3.orig/cups/request.c 2011-09-22 00:09:29.000000000 +0200
+++ cups-1.5.3/cups/request.c 2013-08-27 18:23:35.000000000 +0200
@@ -643,11 +643,13 @@
}
else if (http->state != HTTP_WAITING)
{
- DEBUG_printf(("1cupsSendRequest: Unknown HTTP state (%d), bailing.",
- http->state));
- _cupsSetError(IPP_INTERNAL_ERROR, strerror(EINVAL), 0);
-
- return (HTTP_ERROR);
+ DEBUG_printf(("1cupsSendRequest: Unknown HTTP state (%d), "
+ "reconnecting.", http->state));
+ if (httpReconnect(http))
+ {
+ _cupsSetError(IPP_INTERNAL_ERROR, strerror(EINVAL), 0);
+ return (HTTP_ERROR);
+ }
}
#ifdef HAVE_SSL
@@ -1004,6 +1006,26 @@
httpClose(cg->http);
cg->http = NULL;
}
+ else
+ {
+ /*
+ * Same server, see if the connection is still established...
+ */
+
+ char ch; /* Connection check byte */
+ int n;
+
+ if ( (n = recv(cg->http->fd, &ch, 1, MSG_PEEK | MSG_DONTWAIT) == 0) ||
+ ( n < 0 && errno != EWOULDBLOCK ) )
+ {
+ /*
+ * Nope, close the connection...
+ */
+
+ httpClose(cg->http);
+ cg->http = NULL;
+ }
+ }
}
/*
This solved the reconnect issue for us.
--
You received this bug notification because you are a member of AIMS,
which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1020048
Title:
after certain time printing to cups stops working
Status in LibreOffice Productivity Suite:
New
Status in “cups” package in Ubuntu:
Incomplete
Status in “libreoffice” package in Ubuntu:
Confirmed
Bug description:
in our institution we are running only printers through a cups server.
while freshly opened document prints well, after some time (few
minutes) clicking "print file directly" and menu item "print" do not
work any more. after close and open again, thing prints correctly. i
have checked what exactly is going on in such cases and logs on the
cups server don't show any submissions and/or errors so that the thing
is obviously stopped at the level of libreoffice.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libreoffice 1:3.5.3-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Mon Jul 2 12:29:31 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
LC_PAPER=en_GB.UTF-8
SourcePackage: libreoffice
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/df-libreoffice/+bug/1020048/+subscriptions