Contents of /trunk/cups/patches/cups-1.5.2-dnssd-deviceid.patch
Parent Directory | Revision Log
Revision 1642 -
(show annotations)
(download)
Thu Feb 16 08:44:18 2012 UTC (12 years, 7 months ago) by niro
File size: 1596 byte(s)
Thu Feb 16 08:44:18 2012 UTC (12 years, 7 months ago) by niro
File size: 1596 byte(s)
-added redhat/fedora avahi patches
1 | diff -up cups-1.5b1/backend/dnssd.c.dnssd-deviceid cups-1.5b1/backend/dnssd.c |
2 | --- cups-1.5b1/backend/dnssd.c.dnssd-deviceid 2011-05-20 05:49:49.000000000 +0200 |
3 | +++ cups-1.5b1/backend/dnssd.c 2011-05-24 17:28:18.000000000 +0200 |
4 | @@ -817,15 +817,22 @@ query_callback( |
5 | if (device->device_id) |
6 | free(device->device_id); |
7 | |
8 | + if (device_id[0]) |
9 | + { |
10 | + /* Mark this as the real device ID. */ |
11 | + ptr = device_id + strlen(device_id); |
12 | + snprintf(ptr, sizeof(device_id) - (ptr - device_id), "FZY:0;"); |
13 | + } |
14 | + |
15 | if (!device_id[0] && strcmp(model, "Unknown")) |
16 | { |
17 | if (make_and_model[0]) |
18 | - snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;", |
19 | + snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;", |
20 | make_and_model, model); |
21 | else if (!_cups_strncasecmp(model, "designjet ", 10)) |
22 | - snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s", model + 10); |
23 | + snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s;FZY:1;", model + 10); |
24 | else if (!_cups_strncasecmp(model, "stylus ", 7)) |
25 | - snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s", model + 7); |
26 | + snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s;FZY:1;", model + 7); |
27 | else if ((ptr = strchr(model, ' ')) != NULL) |
28 | { |
29 | /* |
30 | @@ -835,7 +842,7 @@ query_callback( |
31 | memcpy(make_and_model, model, ptr - model); |
32 | make_and_model[ptr - model] = '\0'; |
33 | |
34 | - snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s", |
35 | + snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;", |
36 | make_and_model, ptr + 1); |
37 | } |
38 | } |