From 5971f651693877f0a40f0bd48a6b896c1efd16b8 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 22 Dec 2010 11:16:17 +0000 Subject: [PATCH] Don't crash when job queued for browsed printer that times out (bug #660604). --- cups-str3754.patch | 11 +++++++++++ cups.spec | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 cups-str3754.patch diff --git a/cups-str3754.patch b/cups-str3754.patch new file mode 100644 index 0000000..148575a --- /dev/null +++ b/cups-str3754.patch @@ -0,0 +1,11 @@ +diff -up cups-1.4.5/scheduler/printers.c.printer-timeout cups-1.4.5/scheduler/printers.c +--- cups-1.4.5/scheduler/printers.c.printer-timeout 2010-12-16 14:42:07.048865052 +0000 ++++ cups-1.4.5/scheduler/printers.c 2010-12-16 14:43:05.325684376 +0000 +@@ -785,6 +785,7 @@ cupsdDeletePrinter( + */ + + cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, update); ++ p->state = IPP_PRINTER_STOPPED; + + if (p->job) + cupsdSetJobState(p->job, IPP_JOB_PENDING, CUPSD_JOB_FORCE, diff --git a/cups.spec b/cups.spec index 7ff79ee..2c55562 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.5 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -67,6 +67,7 @@ Patch35: cups-dnssd-deviceid.patch Patch36: cups-ricoh-deviceid-oid.patch Patch37: cups-texttops-rotate-page.patch Patch38: cups-autotype-crash.patch +Patch39: cups-str3754.patch Patch100: cups-lspp.patch @@ -276,6 +277,8 @@ module. %patch37 -p1 -b .texttops-rotate-page # Don't crash when MIME database could not be loaded (bug #610088). %patch38 -p1 -b .autotype-crash +# Don't crash when job queued for printer that times out (bug #660604). +%patch39 -p1 -b .str3754 %if %lspp # LSPP support. @@ -573,6 +576,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Dec 22 2010 Tim Waugh 1:1.4.5-4 +- Don't crash when job queued for browsed printer that times out + (bug #660604). + * Mon Dec 13 2010 Jiri Popelka 1:1.4.5-3 - Call avc_init() only once to not leak file descriptors (bug #654075).