- Mark DNS-SD Device IDs that have been guessed at with "FZY:1;".
This commit is contained in:
parent
ca951c9d94
commit
c269c40121
38
cups-dnssd-deviceid.patch
Normal file
38
cups-dnssd-deviceid.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff -up cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch cups-1.4.3/backend/dnssd.c
|
||||
--- cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch 2010-04-16 19:36:12.226148774 +0100
|
||||
+++ cups-1.4.3/backend/dnssd.c 2010-04-16 19:39:53.314148240 +0100
|
||||
@@ -1192,15 +1192,22 @@ find_device (cups_array_t *devices,
|
||||
if (device->device_id)
|
||||
free(device->device_id);
|
||||
|
||||
+ if (device_id[0])
|
||||
+ {
|
||||
+ /* Mark this as the real device ID. */
|
||||
+ ptr = device_id + strlen(device_id);
|
||||
+ snprintf(ptr, sizeof(device_id) - (ptr - device_id), "FZY:0;");
|
||||
+ }
|
||||
+
|
||||
if (!device_id[0] && strcmp(model, "Unknown"))
|
||||
{
|
||||
if (make_and_model[0])
|
||||
- snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;",
|
||||
+ snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;",
|
||||
make_and_model, model);
|
||||
else if (!strncasecmp(model, "designjet ", 10))
|
||||
- snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s", model + 10);
|
||||
+ snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s;FZY:1;", model + 10);
|
||||
else if (!strncasecmp(model, "stylus ", 7))
|
||||
- snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s", model + 7);
|
||||
+ snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s;FZY:1;", model + 7);
|
||||
else if ((ptr = strchr(model, ' ')) != NULL)
|
||||
{
|
||||
/*
|
||||
@@ -1210,7 +1217,7 @@ find_device (cups_array_t *devices,
|
||||
memcpy(make_and_model, model, ptr - model);
|
||||
make_and_model[ptr - model] = '\0';
|
||||
|
||||
- snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s",
|
||||
+ snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;",
|
||||
make_and_model, ptr + 1);
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.4.3
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
||||
@ -65,6 +65,7 @@ Patch31: cups-str3505.patch
|
||||
Patch32: cups-str3541.patch
|
||||
Patch33: cups-snmp-quirks.patch
|
||||
Patch34: cups-hp-deviceid-oid.patch
|
||||
Patch35: cups-dnssd-deviceid.patch
|
||||
|
||||
Patch100: cups-lspp.patch
|
||||
|
||||
@ -268,6 +269,8 @@ module.
|
||||
%patch33 -p1 -b .snmp-quirks
|
||||
# Add an SNMP query for HP's device ID OID (STR #3552).
|
||||
%patch34 -p1 -b .hp-deviceid-oid
|
||||
# Mark DNS-SD Device IDs that have been guessed at with "FZY:1;".
|
||||
%patch35 -p1 -b .dnssd-deviceid
|
||||
|
||||
%if %lspp
|
||||
# LSPP support.
|
||||
@ -568,6 +571,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{php_extdir}/phpcups.so
|
||||
|
||||
%changelog
|
||||
* Fri Apr 16 2010 Tim Waugh <twaugh@redhat.com> 1:1.4.3-6
|
||||
- Mark DNS-SD Device IDs that have been guessed at with "FZY:1;".
|
||||
|
||||
* Fri Apr 16 2010 Jiri Popelka <jpopelka@redhat.com> 1:1.4.3-5
|
||||
- Fixed str3541.patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user