rpms/hplip/F-12 hplip-retry-open.patch, NONE, 1.1 hplip.spec, 1.242, 1.243
Tim Waugh
twaugh at fedoraproject.org
Thu Oct 29 12:51:16 UTC 2009
Author: twaugh
Update of /cvs/pkgs/rpms/hplip/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18270
Modified Files:
hplip.spec
Added Files:
hplip-retry-open.patch
Log Message:
* Thu Oct 29 2009 Tim Waugh <twaugh at redhat.com> 3.9.8-19
- Retry when connecting to device fails (bug #528483).
hplip-retry-open.patch:
hp.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
--- NEW FILE hplip-retry-open.patch ---
diff -up hplip-3.9.8/prnt/backend/hp.c.retry-open hplip-3.9.8/prnt/backend/hp.c
--- hplip-3.9.8/prnt/backend/hp.c.retry-open 2009-10-27 11:46:00.181457688 +0000
+++ hplip-3.9.8/prnt/backend/hp.c 2009-10-27 11:57:51.527583553 +0000
@@ -724,11 +724,21 @@ int main(int argc, char *argv[])
/* Open hp device. */
while ((stat = hpmud_open_device(argv[0], ma.prt_mode, &hd)) != HPMUD_R_OK)
{
- if (stat != HPMUD_R_DEVICE_BUSY)
- {
- BUG("ERROR: cannot open device stat=%d: %s\n", stat, argv[0]);
- goto bugout;
- }
+ if (getenv ("CLASS") != NULL)
+ {
+ /* If the CLASS environment variable is set we
+ * need to give other class members a chance in
+ * case their devices are ready to go.
+ */
+
+ BUG("INFO: cannot open device stat=%d: %s\n", stat, argv[0]);
+ BUG("INFO: queuing on next printer in class...\n");
+
+ /* Prevent job requeuing too quickly. */
+ sleep (5);
+
+ goto bugout;
+ }
/* Display user error. */
device_event(argv[0], printer, 5000+stat, argv[2], argv[1], argv[3]);
Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-12/hplip.spec,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -p -r1.242 -r1.243
--- hplip.spec 29 Oct 2009 12:24:42 -0000 1.242
+++ hplip.spec 29 Oct 2009 12:51:15 -0000 1.243
@@ -24,8 +24,9 @@ Patch8: hplip-non-scripts.patch
Patch9: hplip-requirespageregion.patch
Patch10: hplip-discovery-method.patch
Patch11: hplip-device-reconnected.patch
-Patch12: hplip-plugin-error.patch
-Patch13: hplip-hpcups-sigpipe.patch
+Patch12: hplip-retry-open.patch
+Patch13: hplip-plugin-error.patch
+Patch14: hplip-hpcups-sigpipe.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(pre): /sbin/service
@@ -148,12 +149,15 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version}
# Give up trying to print a job to a reconnected device (bug #515481).
%patch11 -p1 -b .device-reconnected
+# Retry when connecting to device fails (bug #528483).
+%patch12 -p1 -b .retry-open
+
# Set a printer-state-reason when there's a missing required plugin
# (bug #531330).
-%patch12 -p1 -b .plugin-error
+%patch13 -p1 -b .plugin-error
# Avoid busy loop in hpcups when backend has exited (bug #525944).
-%patch13 -p1 -b .hpcups-sigpipe
+%patch14 -p1 -b .hpcups-sigpipe
%build
aclocal
@@ -359,6 +363,7 @@ fi
%changelog
* Thu Oct 29 2009 Tim Waugh <twaugh at redhat.com> 3.9.8-19
+- Retry when connecting to device fails (bug #528483).
- Avoid busy loop in hpcups when backend has exited (bug #525944).
* Wed Oct 28 2009 Tim Waugh <twaugh at redhat.com> 3.9.8-18
More information about the fedora-extras-commits
mailing list