Release parport if unsupported model connected (bug #699052).

This commit is contained in:
Tim Waugh 2012-03-21 16:36:22 +00:00
parent 444f2b113e
commit d9f4b52d9a
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up hplip-3.12.2/io/hpmud/pp.c.release-parport hplip-3.12.2/io/hpmud/pp.c
--- hplip-3.12.2/io/hpmud/pp.c.release-parport 2012-02-01 11:53:52.000000000 +0000
+++ hplip-3.12.2/io/hpmud/pp.c 2012-03-21 16:43:31.876908024 +0000
@@ -1240,6 +1240,8 @@ int __attribute__ ((visibility ("hidden"
if (ma.support != HPMUD_SUPPORT_TYPE_HPLIP)
{
BUG("ignoring %s support=%d\n", dev, ma.support);
+ release_pp(fd);
+ close(fd);
continue; /* ignor, not supported */
}

View File

@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.12.2
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@ -33,6 +33,7 @@ Patch16: hplip-bad-low-ink-warning.patch
Patch17: hplip-deviceIDs-ppd.patch
Patch18: hplip-skip-blank-lines.patch
Patch19: hplip-dbglog-newline.patch
Patch20: hplip-release-parport.patch
Patch21: hplip-ppd-ImageableArea.patch
Patch22: hplip-raw_deviceID-traceback.patch
Patch23: hplip-UnicodeDecodeError.patch
@ -249,6 +250,9 @@ done
# Added missing newline to string argument in dbglog() call (bug #585275).
%patch19 -p1 -b .dbglog-newline
# Release parport if unsupported model connected (bug #699052).
%patch20 -p1 -b .release-parport
# Fix ImageableArea for Laserjet 8150/9000 (bug #596298).
for ppd_file in $(grep '^diff' %{PATCH21} | cut -d " " -f 4);
do
@ -515,6 +519,9 @@ fi
%postun libs -p /sbin/ldconfig
%changelog
* Wed Mar 21 2012 Tim Waugh <twaugh@redhat.com> 3.12.2-4
- Release parport if unsupported model connected (bug #699052).
* Wed Feb 29 2012 Tim Waugh <twaugh@redhat.com> 3.12.2-3
- Added another IEEE 1284 Device ID for Color LaserJet CP2025dn to
cope with its DNS-SD response, which has no usb_* keys (bug #651509).