model mismatch during scanning due 'HP_' string
This commit is contained in:
parent
16f1c5dbc9
commit
07e64db764
@ -1,3 +1,30 @@
|
|||||||
|
diff --git a/io/hpmud/jd.c b/io/hpmud/jd.c
|
||||||
|
index 20df27a..7ed4918 100644
|
||||||
|
--- a/io/hpmud/jd.c
|
||||||
|
+++ b/io/hpmud/jd.c
|
||||||
|
@@ -208,7 +208,22 @@ enum HPMUD_RESULT __attribute__ ((visibility ("hidden"))) jd_open(mud_device *pd
|
||||||
|
{
|
||||||
|
/* Make sure uri model matches device id model. */
|
||||||
|
hpmud_get_uri_model(pd->uri, uri_model, sizeof(uri_model));
|
||||||
|
+
|
||||||
|
+ /* remove possible hp_ string */
|
||||||
|
+ if (strncasecmp(uri_model, "HP_", 3) == 0)
|
||||||
|
+ {
|
||||||
|
+ memmove(uri_model, uri_model + 3, 127);
|
||||||
|
+ uri_model[127] = '\0';
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
hpmud_get_model(pd->id, model, sizeof(model));
|
||||||
|
+ /* remove possible hp_ string */
|
||||||
|
+ if (strncasecmp(model, "HP_", 3) == 0)
|
||||||
|
+ {
|
||||||
|
+ memmove(model, model + 3, 127);
|
||||||
|
+ model[127] = '\0';
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (strcasecmp(uri_model, model) != 0)
|
||||||
|
{
|
||||||
|
stat = HPMUD_R_INVALID_URI; /* different device plugged in */
|
||||||
diff --git a/io/hpmud/model.c b/io/hpmud/model.c
|
diff --git a/io/hpmud/model.c b/io/hpmud/model.c
|
||||||
index d546ec1..5bb6091 100644
|
index d546ec1..5bb6091 100644
|
||||||
--- a/io/hpmud/model.c
|
--- a/io/hpmud/model.c
|
15
hplip.spec
15
hplip.spec
@ -7,7 +7,7 @@
|
|||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.20.3
|
Version: 3.20.3
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
|
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
|
||||||
|
|
||||||
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
Url: https://developers.hp.com/hp-linux-imaging-and-printing
|
||||||
@ -119,19 +119,21 @@ Patch47: hplip-systray-blockerror.patch
|
|||||||
# reported upstream https://bugs.launchpad.net/hplip/+bug/1843592
|
# reported upstream https://bugs.launchpad.net/hplip/+bug/1843592
|
||||||
# bugzillas 1742949, 1740132, 1739855
|
# bugzillas 1742949, 1740132, 1739855
|
||||||
Patch48: hplip-missing-drivers.patch
|
Patch48: hplip-missing-drivers.patch
|
||||||
# laserjet 2200 has different device id than HP expects...
|
# laserjet 2200 and other devices have different device id than HP expects...
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1772698
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1772698
|
||||||
# reported upstream https://bugs.launchpad.net/hplip/+bug/1853002
|
# reported upstream https://bugs.launchpad.net/hplip/+bug/1853002
|
||||||
Patch49: hplip-missing-laserjet2200.patch
|
Patch49: hplip-model-mismatch.patch
|
||||||
# sixext has problems with python3 strings (bz#1573430)
|
# sixext has problems with python3 strings (bz#1573430)
|
||||||
# reported https://bugs.launchpad.net/bugs/1480152
|
# reported https://bugs.launchpad.net/bugs/1480152
|
||||||
Patch50: hplip-unicodeerror.patch
|
Patch50: hplip-unicodeerror.patch
|
||||||
# the version attribute in python-pillow got changed again..
|
# the version attribute in python-pillow got changed again..
|
||||||
# https://bugs.launchpad.net/hplip/+bug/1863620
|
# https://bugs.launchpad.net/hplip/+bug/1863620
|
||||||
Patch51: hplip-pil.patch
|
Patch51: hplip-pil.patch
|
||||||
|
# error with new gcc, already reported in upstream as
|
||||||
|
# https://bugs.launchpad.net/hplip/+bug/1836735
|
||||||
Patch52: hplip-fix-Wreturn-type-warning.patch
|
Patch52: hplip-fix-Wreturn-type-warning.patch
|
||||||
|
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-pillow
|
Requires: python3-pillow
|
||||||
Requires: cups
|
Requires: cups
|
||||||
@ -388,7 +390,7 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
|
|||||||
# 1742949, 1740132, 1739855 - missing drivers
|
# 1742949, 1740132, 1739855 - missing drivers
|
||||||
%patch48 -p1 -b .missing-drivers
|
%patch48 -p1 -b .missing-drivers
|
||||||
# 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat
|
# 1772698 - Can't setup printer (HP LJ 2200): no attributes found in model.dat
|
||||||
%patch49 -p1 -b .missing-laserjet-2200
|
%patch49 -p1 -b .model-mismatch
|
||||||
# 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
|
# 1573430 - sixext.py:to_string_utf8:UnicodeDecodeError: 'utf-8' codec can't decode bytes
|
||||||
%patch50 -p1 -b .unicodeerror
|
%patch50 -p1 -b .unicodeerror
|
||||||
%patch51 -p1 -b .pil
|
%patch51 -p1 -b .pil
|
||||||
@ -699,6 +701,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 15 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.20.3-5
|
||||||
|
- model mismatch during scanning due 'HP_' string
|
||||||
|
|
||||||
* Tue Apr 07 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.20.3-4
|
* Tue Apr 07 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.20.3-4
|
||||||
- add keyserver.ubuntu.com too (1821469)
|
- add keyserver.ubuntu.com too (1821469)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user