[hplip: 1/2] Pay attention to the SANE localOnly flag in hpaio (bug #743593).
Tim Waugh
twaugh at fedoraproject.org
Thu Oct 20 15:25:15 UTC 2011
commit b2fd2a6f5322beeb383f2a6f9452af6ac98beffa
Author: Tim Waugh <twaugh at redhat.com>
Date: Thu Oct 20 16:02:08 2011 +0100
Pay attention to the SANE localOnly flag in hpaio (bug #743593).
hplip-hpaio-localonly.patch | 45 +++++++++++++++++++++++++++++++++++++++++++
hplip.spec | 9 +++++++-
2 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/hplip-hpaio-localonly.patch b/hplip-hpaio-localonly.patch
new file mode 100644
index 0000000..44e3fc3
--- /dev/null
+++ b/hplip-hpaio-localonly.patch
@@ -0,0 +1,45 @@
+diff -up hplip-3.11.10/scan/sane/hpaio.c~ hplip-3.11.10/scan/sane/hpaio.c
+--- hplip-3.11.10/scan/sane/hpaio.c~ 2011-10-02 04:04:48.000000000 +0100
++++ hplip-3.11.10/scan/sane/hpaio.c 2011-10-20 16:00:38.016534755 +0100
+@@ -272,25 +272,28 @@ static int DevDiscovery(int localOnly)
+ }
+ }
+
+- /* Ignore localOnly flag (used by saned) and always look for network all-in-one scan devices (defined by cups). */
+- cnt = GetCupsPrinters(&cups_printer);
+- for (i=0; i<cnt; i++)
++ /* Check localOnly flag (used by saned) to decide whether to look for network all-in-one scan devices (defined by cups). */
++ if (!localOnly)
+ {
+- hpmud_query_model(cups_printer[i], &ma);
+- if (ma.scantype > 0)
+- {
++ cnt = GetCupsPrinters(&cups_printer);
++ for (i=0; i<cnt; i++)
++ {
++ hpmud_query_model(cups_printer[i], &ma);
++ if (ma.scantype > 0)
++ {
+ hpmud_get_uri_model(cups_printer[i], model, sizeof(model));
+ AddDeviceList(cups_printer[i], model, &DeviceList);
+ total++;
+- }
+- else
+- {
++ }
++ else
++ {
+ DBG6("unsupported scantype=%d %s\n", ma.scantype, cups_printer[i]);
+- }
+- free(cups_printer[i]);
++ }
++ free(cups_printer[i]);
++ }
++ if (cups_printer)
++ free(cups_printer);
+ }
+- if (cups_printer)
+- free(cups_printer);
+
+ bugout:
+ return total;
diff --git a/hplip.spec b/hplip.spec
index 7086d1c..0291abd 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.11.10
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@@ -46,6 +46,7 @@ Patch33: hplip-dbus-threads.patch
Patch34: hplip-notification-exception.patch
Patch35: hplip-CVE-2010-4267.patch
Patch36: hplip-wifisetup.patch
+Patch37: hplip-hpaio-localonly.patch
Requires(pre): /sbin/service
Requires(post): /sbin/chkconfig
@@ -297,6 +298,9 @@ done
# Avoid KeyError in ui4/wifisetupdialog.py (bug #680939).
%patch36 -p1 -b .wifisetup
+# Pay attention to the SANE localOnly flag in hpaio (bug #743593).
+%patch37 -p1 -b .hpaio-localonly
+
sed -i.duplex-constraints \
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
prnt/drv/hpcups.drv.in
@@ -523,6 +527,9 @@ fi
%postun libs -p /sbin/ldconfig
%changelog
+* Thu Oct 20 2011 Tim Waugh <twaugh at redhat.com> 3.11.10-5
+- Pay attention to the SANE localOnly flag in hpaio (bug #743593).
+
* Mon Oct 17 2011 Tim Waugh <twaugh at redhat.com> 3.11.10-4
- Corrected IEEE 1284 Device ID for LaserJet M1319f MFP (bug #746614)
More information about the scm-commits
mailing list