diff --git a/cups-busy-loop.patch b/cups-busy-loop.patch new file mode 100644 index 0000000..55c3bab --- /dev/null +++ b/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); diff --git a/cups.changes b/cups.changes index e932ac8..0f6b9c3 100644 --- a/cups.changes +++ b/cups.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 28 13:03:28 UTC 2015 - mimi.vx@gmail.com + +- Add patch cups-busy-loop.patch to fix rh#1179596 , cups#4605 + ------------------------------------------------------------------- Thu Feb 12 13:50:58 UTC 2015 - tchvatal@suse.com diff --git a/cups.spec b/cups.spec index 6fd726c..f43da00 100644 --- a/cups.spec +++ b/cups.spec @@ -1,7 +1,7 @@ # # spec file for package cups # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -43,6 +43,8 @@ Patch10: cups-1.2rc1-template.patch Patch11: cups-1.4.3-default-webcontent-path.patch # Patch12 cups-systemd-socket.patch Use systemd socket activation properly Patch12: cups-systemd-socket.patch +# Patch13 cups-busy-loop.patch fixes rh#1179596 cups#4605 +Patch13: cups-busy-loop.patch # Patch100...Patch999 is for private patches from SUSE which are not intended for upstream: # Patch100 cups-pam.diff adds conf/pam.suse regarding support for PAM for SUSE: Patch100: cups-pam.diff @@ -251,6 +253,7 @@ browsing". This is now handled by cups-browsed service. # and http://bugzilla.novell.com/show_bug.cgi?id=546023#c6 and subsequent comments: %patch11 %patch12 -p1 +%patch13 -p1 # Patch100...Patch999 is for private patches from SUSE which are not intended for upstream: # Patch100 cups-pam.diff adds conf/pam.suse regarding support for PAM for SUSE: %patch100