rpms/hplip/FC-6 hplip-out-of-paper.patch, NONE, 1.1 hplip.spec, 1.99, 1.100
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Dec 6 13:13:20 UTC 2006
Author: twaugh
Update of /cvs/dist/rpms/hplip/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv23124
Modified Files:
hplip.spec
Added Files:
hplip-out-of-paper.patch
Log Message:
* Wed Dec 6 2006 Tim Waugh <twaugh at redhat.com>
- Reported out-of-paper and offline conditions in CUPS backend (bug #216477).
- Resolves: rhbz#216477
hplip-out-of-paper.patch:
hp.c | 39 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 38 insertions(+), 1 deletion(-)
--- NEW FILE hplip-out-of-paper.patch ---
--- hplip-1.6.10/backend/hp/hp.c.out-of-paper 2006-11-23 11:10:27.000000000 +0000
+++ hplip-1.6.10/backend/hp/hp.c 2006-11-23 13:40:47.000000000 +0000
@@ -408,6 +408,7 @@
int len, vstatus, cnt;
char buf[BUFFER_SIZE+HEADER_SIZE];
MsgAttributes ma;
+ int paperout = 0, offline = 0;
if (argc > 1)
{
@@ -532,17 +533,53 @@
if (n != size)
{
+ const char *state;
+
/* IO error, get printer status. */
vstatus = GetVStatus(hd);
/* Display user error. */
DeviceEvent(argv[0], argv[1], vstatus, "error", RETRY_TIMEOUT);
- bug("INFO: %s; will retry in %d seconds...\n", GetVStatusMessage(vstatus), RETRY_TIMEOUT);
+ switch (vstatus)
+ {
+ case VSTATUS_OOPA:
+ if (!paperout)
+ {
+ fputs("STATE: +media-empty-error\n", stderr);
+ paperout = 1;
+ }
+ break;
+ default:
+ if (!offline)
+ {
+ fputs("STATE: +other\n", stderr);
+ offline = 1;
+ }
+ break;
+ }
+ bug("ERROR: %s; will retry in %d seconds...\n",
+ GetVStatusMessage(vstatus), RETRY_TIMEOUT);
sleep(RETRY_TIMEOUT);
retry = 1;
}
+ else
+ {
+ if (paperout || offline)
+ bug("INFO: Printing...\n");
+
+ if (paperout)
+ {
+ paperout = 0;
+ fputs("STATE: -media-empty-error\n", stderr);
+ }
+ if (offline)
+ {
+ offline = 0;
+ fputs("STATE: -other\n", stderr);
+ }
+ }
total+=n;
size-=n;
}
Index: hplip.spec
===================================================================
RCS file: /cvs/dist/rpms/hplip/FC-6/hplip.spec,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- hplip.spec 1 Nov 2006 16:22:27 -0000 1.99
+++ hplip.spec 6 Dec 2006 13:13:18 -0000 1.100
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 1.6.10
-Release: 1%{?dist}.4
+Release: 2.0.0.1%{?dist}
License: GPL/MIT/BSD
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@@ -22,6 +22,7 @@
Patch7: hplip-loop.patch
Patch8: hplip-ipv6.patch
Patch9: hplip-sane-debug.patch
+Patch10: hplip-out-of-paper.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Requires: desktop-file-utils >= 0.2.92
@@ -97,6 +98,9 @@
# Allow debugging of the SANE backend.
%patch9 -p1 -b .sane-debug
+# Report out-of-paper and offline conditions in CUPS backend (bug #216477).
+%patch10 -p1 -b .out-of-paper
+
autoconf # for patch4
%build
@@ -197,6 +201,9 @@
exit 0
%changelog
+* Wed Dec 6 2006 Tim Waugh <twaugh at redhat.com>
+- Reported out-of-paper and offline conditions in CUPS backend (bug #216477).
+
* Wed Nov 1 2006 Tim Waugh <twaugh at redhat.com> 1.6.10-1.4
- Fixed debugging patch.
More information about the fedora-cvs-commits
mailing list