Pay attention to the SANE localOnly flag in hpaio (bug #743593).
This commit is contained in:
parent
2652744294
commit
b2fd2a6f53
45
hplip-hpaio-localonly.patch
Normal file
45
hplip-hpaio-localonly.patch
Normal file
@ -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;
|
@ -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@redhat.com> 3.11.10-5
|
||||
- Pay attention to the SANE localOnly flag in hpaio (bug #743593).
|
||||
|
||||
* Mon Oct 17 2011 Tim Waugh <twaugh@redhat.com> 3.11.10-4
|
||||
- Corrected IEEE 1284 Device ID for LaserJet M1319f MFP (bug #746614)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user