diff options
author | Juergen Daubert <jue@jue.li> | 2015-03-22 16:00:43 +0100 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2015-03-22 16:00:43 +0100 |
commit | 6e33593f1ea422fce05328d1be200ce8420b47b9 (patch) | |
tree | 26605876fec920a24677468efaa034388241795d /cups | |
parent | 97153188fcbf23495040dfe96b41770c7db3eb2e (diff) | |
download | opt-6e33593f1ea422fce05328d1be200ce8420b47b9.tar.gz opt-6e33593f1ea422fce05328d1be200ce8420b47b9.tar.xz |
cups: apply patch from fedora, fix for FS#1143
Diffstat (limited to 'cups')
-rw-r--r-- | cups/.md5sum | 1 | ||||
-rw-r--r-- | cups/Pkgfile | 8 | ||||
-rw-r--r-- | cups/cups-busy-loop.patch | 34 |
3 files changed, 41 insertions, 2 deletions
diff --git a/cups/.md5sum b/cups/.md5sum index 9e6110e6c..ffd18b7bc 100644 --- a/cups/.md5sum +++ b/cups/.md5sum @@ -1,2 +1,3 @@ 4965028855c65ea97d8064de568e3d0d cups 6e0ea72dbafcf5baaa1cf4178e71096d cups-2.0.2-source.tar.bz2 +0325f63759c09c347622a14f4940bb86 cups-busy-loop.patch diff --git a/cups/Pkgfile b/cups/Pkgfile index 24aa9a852..906f949d7 100644 --- a/cups/Pkgfile +++ b/cups/Pkgfile @@ -5,13 +5,17 @@ name=cups version=2.0.2 -release=1 +release=2 source=(http://www.cups.org/software/$version/$name-$version-source.tar.bz2 - cups) + cups-busy-loop.patch cups) build () { cd $name-$version + # https://crux.nu/bugs/index.php?do=details&task_id=1143 + # http://pkgs.fedoraproject.org/cgit/cups.git/commit/?id=746dd9cf56e9522ca51c4cc669fc65b46e2d4866 + patch -p1 -i $SRC/cups-busy-loop.patch + ./configure --prefix=/usr \ --sysconfdir=/etc \ --libdir=/usr/lib \ diff --git a/cups/cups-busy-loop.patch b/cups/cups-busy-loop.patch new file mode 100644 index 000000000..8c95546ab --- /dev/null +++ b/cups/cups-busy-loop.patch @@ -0,0 +1,34 @@ +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); |