Apply upstream patch to stop backend spinning on failed auth (bug #873264).
Resolves: rhbz#873264
This commit is contained in:
parent
b230f1803f
commit
f40e662734
71
cups-str4190.patch
Normal file
71
cups-str4190.patch
Normal file
@ -0,0 +1,71 @@
|
||||
diff -up cups-1.5.4/backend/ipp.c.str4190 cups-1.5.4/backend/ipp.c
|
||||
--- cups-1.5.4/backend/ipp.c.str4190 2012-11-05 17:18:56.265644206 +0000
|
||||
+++ cups-1.5.4/backend/ipp.c 2012-11-05 17:19:23.948745897 +0000
|
||||
@@ -1305,6 +1305,16 @@ main(int argc, /* I - Number of comm
|
||||
}
|
||||
|
||||
/*
|
||||
+ * If the printer only claims to support IPP/1.0, or if the user specifically
|
||||
+ * included version=1.0 in the URI, then do not try to use Create-Job or
|
||||
+ * Send-Document. This is another dreaded compatibility hack, but unfortunately
|
||||
+ * there are enough broken printers out there that we need this for now...
|
||||
+ */
|
||||
+
|
||||
+ if (version == 10)
|
||||
+ create_job = send_document = 0;
|
||||
+
|
||||
+ /*
|
||||
* Start monitoring the printer in the background...
|
||||
*/
|
||||
|
||||
@@ -1520,10 +1530,9 @@ main(int argc, /* I - Number of comm
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
- else if (ipp_status == IPP_ERROR_JOB_CANCELED)
|
||||
+ else if (ipp_status == IPP_ERROR_JOB_CANCELED ||
|
||||
+ ipp_status == IPP_NOT_AUTHORIZED)
|
||||
goto cleanup;
|
||||
- else if (ipp_status == IPP_NOT_AUTHORIZED)
|
||||
- continue;
|
||||
else
|
||||
{
|
||||
/*
|
||||
@@ -1709,14 +1718,35 @@ main(int argc, /* I - Number of comm
|
||||
ipp_status == IPP_NOT_POSSIBLE ||
|
||||
ipp_status == IPP_PRINTER_BUSY)
|
||||
continue;
|
||||
- else if (ipp_status == IPP_REQUEST_VALUE)
|
||||
+ else if (ipp_status == IPP_REQUEST_VALUE ||
|
||||
+ ipp_status == IPP_ERROR_JOB_CANCELED ||
|
||||
+ ipp_status == IPP_NOT_AUTHORIZED)
|
||||
{
|
||||
/*
|
||||
- * Print file is too large, abort this job...
|
||||
+ * Print file is too large, job was canceled, or we need new
|
||||
+ * authentication data...
|
||||
*/
|
||||
|
||||
goto cleanup;
|
||||
}
|
||||
+ else if (ipp_status == IPP_NOT_FOUND)
|
||||
+ {
|
||||
+ /*
|
||||
+ * Printer does not actually implement support for Create-Job/
|
||||
+ * Send-Document, so log the conformance issue and stop the printer.
|
||||
+ */
|
||||
+
|
||||
+ fputs("DEBUG: This printer claims to support Create-Job and "
|
||||
+ "Send-Document, but those operations failed.\n", stderr);
|
||||
+ fputs("DEBUG: Add '?version=1.0' to the device URI to use legacy "
|
||||
+ "compatibility mode.\n", stderr);
|
||||
+ update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
|
||||
+ "cups-ipp-missing-send-document");
|
||||
+
|
||||
+ ipp_status = IPP_INTERNAL_ERROR; /* Force queue to stop */
|
||||
+
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
else
|
||||
copies_remaining --;
|
||||
|
@ -12,7 +12,7 @@
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.5.4
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
||||
@ -78,6 +78,7 @@ Patch42: cups-str4124.patch
|
||||
Patch43: cups-str4194.patch
|
||||
Patch44: cups-r10638.patch
|
||||
Patch45: cups-r10642.patch
|
||||
Patch46: cups-str4190.patch
|
||||
|
||||
Patch100: cups-lspp.patch
|
||||
|
||||
@ -321,6 +322,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
%patch44 -p1 -b .r10638
|
||||
# Work around broken 1284 device IDs that use a newline instead of a semicolon.
|
||||
%patch45 -p1 -b .r10642
|
||||
# Apply upstream patch to stop backend spinning on failed auth (bug #873264).
|
||||
%patch46 -p1 -b .str4190
|
||||
|
||||
%if %lspp
|
||||
# LSPP support.
|
||||
@ -682,6 +685,9 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%{_mandir}/man1/ipptool.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Nov 5 2012 Tim Waugh <twaugh@redhat.com> 1:1.5.4-14
|
||||
- Apply upstream patch to stop backend spinning on failed auth (bug #873264).
|
||||
|
||||
* Wed Oct 31 2012 Tim Waugh <twaugh@redhat.com> 1:1.5.4-13
|
||||
- Ensure attributes are valid UTF-8 in dbus notifier (bug #863387).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user