extra/cups to 2.0.2-3

This commit is contained in:
Kevin Mihelich 2015-03-22 13:41:08 +00:00
parent 6a63f17131
commit a070163828
2 changed files with 41 additions and 3 deletions

View file

@ -7,7 +7,7 @@
pkgbase="cups"
pkgname=('libcups' 'cups')
pkgver=2.0.2
pkgrel=1
pkgrel=3
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.cups.org/"
@ -23,7 +23,7 @@ source=(http://www.cups.org/software/${pkgver}/cups-${pkgver}-source.tar.bz2{,.s
cups-1.6.2-statedir.patch
cups-1.6.0-fix-install-perms.patch
# bugfixes
)
cups-busy-loop.patch)
md5sums=('6e0ea72dbafcf5baaa1cf4178e71096d'
'SKIP'
'fc8286f185e2cc5f7e1f6843bf193e2b'
@ -32,7 +32,8 @@ md5sums=('6e0ea72dbafcf5baaa1cf4178e71096d'
'1beb4896f217bc241bc08a422274ec0c'
'90c30380d4c8cd48a908cfdadae1ea24'
'451609db34f95209d64c38474de27ce1'
'5117f65342fcc69c6a506529e4daca9e')
'5117f65342fcc69c6a506529e4daca9e'
'68c70bda07ccb8caaa7a2df485a16092')
validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security@cups.org>
prepare() {
@ -51,6 +52,8 @@ prepare() {
patch -Np0 -i ${srcdir}/cups-1.6.0-fix-install-perms.patch
# bug fixes
# Avoid busy loop in cupsd when connection is closed after request Fedora ##1179596 - may solve FS#42666
patch -Np1 -i ${srcdir}/cups-busy-loop.patch
# set MaxLogSize to 0 to prevent using cups internal log rotation
sed -i -e '5i\ ' conf/cupsd.conf.in

View file

@ -0,0 +1,35 @@
diff -up cups-2.0.2/scheduler/client.c.busy-loop cups-2.0.2/scheduler/client.c
--- cups-2.0.2/scheduler/client.c.busy-loop 2014-08-28 16:37:22.000000000 +0100
+++ cups-2.0.2/scheduler/client.c 2015-03-16 17:24:32.506232983 +0000
@@ -585,6 +585,17 @@ cupsdReadClient(cupsd_client_t *con) /*
* connection and we need to shut it down...
*/
+ if (!httpGetReady(con->http) && recv(httpGetFd(con->http), buf, 1, MSG_PEEK) < 1)
+ {
+ /*
+ * Connection closed...
+ */
+
+ cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on EOF.");
+ cupsdCloseClient(con);
+ return;
+ }
+
cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on unexpected HTTP read state %s.",
httpStateString(httpGetState(con->http)));
cupsdCloseClient(con);
@@ -1979,12 +1990,6 @@ cupsdReadClient(cupsd_client_t *con) /*
if (httpGetState(con->http) == HTTP_STATE_POST_SEND)
{
- /*
- * Don't listen for activity until we decide to do something with this...
- */
-
- cupsdAddSelect(httpGetFd(con->http), NULL, NULL, con);
-
if (con->file >= 0)
{
fstat(con->file, &filestats);