From ed9f3aad2e6bcc8cc65348fc60d9ae183812a023 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 26 Nov 2009 14:33:07 +0000 Subject: [PATCH] - Fixed Device ID parsing code in hpijs's dj9xxvip.c (bug #510926). --- hplip-bad-low-ink-warning.patch | 39 +++++++++++++++++++++++++++++++++ hplip.spec | 9 +++++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 hplip-bad-low-ink-warning.patch diff --git a/hplip-bad-low-ink-warning.patch b/hplip-bad-low-ink-warning.patch new file mode 100644 index 0000000..6bc0d8b --- /dev/null +++ b/hplip-bad-low-ink-warning.patch @@ -0,0 +1,39 @@ +diff -up hplip-3.9.10/prnt/hpijs/dj9xxvip.cpp.bad-low-ink-warning hplip-3.9.10/prnt/hpijs/dj9xxvip.cpp +--- hplip-3.9.10/prnt/hpijs/dj9xxvip.cpp.bad-low-ink-warning 2009-11-26 14:30:31.325303260 +0000 ++++ hplip-3.9.10/prnt/hpijs/dj9xxvip.cpp 2009-11-26 14:31:10.125303367 +0000 +@@ -2222,7 +2222,7 @@ DRIVER_ERROR DJ9xxVIP::CheckInkLevel() + { + case '5': + { +- if ((*(pStr+1) & 0xf3) > 1) ++ if ((*(pStr+1) & 0xf3) > '1') + { + if (err != NO_ERROR) + { +@@ -2237,7 +2237,7 @@ DRIVER_ERROR DJ9xxVIP::CheckInkLevel() + } + case '6': + { +- if ((*(pStr+1) & 0xf3) > 1) ++ if ((*(pStr+1) & 0xf3) > '1') + { + if (err != NO_ERROR) + { +@@ -2252,7 +2252,7 @@ DRIVER_ERROR DJ9xxVIP::CheckInkLevel() + } + case '7': + { +- if ((*(pStr+1) & 0xf3) > 1) ++ if ((*(pStr+1) & 0xf3) > '1') + { + if (err != NO_ERROR) + { +@@ -2268,7 +2268,7 @@ DRIVER_ERROR DJ9xxVIP::CheckInkLevel() + } + case '8': + { +- if ((*(pStr+1) & 0xf3) > 1) ++ if ((*(pStr+1) & 0xf3) > '1') + { + if (err != NO_ERROR) + { diff --git a/hplip.spec b/hplip.spec index 65b7a0c..91ee1c8 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,7 +1,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.9.10 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons Conflicts: system-config-printer < 0.6.132 @@ -21,6 +21,7 @@ Patch10: hplip-discovery-method.patch Patch11: hplip-device-reconnected.patch Patch14: hplip-hpcups-sigpipe.patch Patch15: hplip-hpcups-plugin.patch +Patch16: hplip-bad-low-ink-warning.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /sbin/service @@ -134,6 +135,9 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version} # (bug #513283). %patch15 -p1 -b .hpcups-plugin +# Fixed Device ID parsing code in hpijs's dj9xxvip.c (bug #510926). +%patch16 -p1 -b .bad-low-ink-warning + sed -i.duplex-constraints \ -e 's,\(UIConstraints.* \*Duplex\),//\1,' \ prnt/drv/hpcups.drv.in @@ -342,6 +346,9 @@ fi /usr/bin/update-desktop-database &>/dev/null ||: %changelog +* Thu Nov 26 2009 Tim Waugh 3.9.10-4 +- Fixed Device ID parsing code in hpijs's dj9xxvip.c (bug #510926). + * Thu Nov 26 2009 Tim Waugh 3.9.10-3 - Removed duplex constraints on page sizes with imageable areas larger than possible when duplexing (bug #541572).