diff options
author | Remi Collet <fedora@famillecollet.com> | 2011-12-27 16:50:50 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2011-12-27 16:50:50 +0100 |
commit | 65608e0f8bbc0190cc1b7646f653e796c807f02b (patch) | |
tree | 274ade8f5007bd7f9c252d8262637e0300363e82 /cups-dnssd-deviceid.patch |
import cups from F16
Diffstat (limited to 'cups-dnssd-deviceid.patch')
-rw-r--r-- | cups-dnssd-deviceid.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cups-dnssd-deviceid.patch b/cups-dnssd-deviceid.patch new file mode 100644 index 0000000..dedbcb2 --- /dev/null +++ b/cups-dnssd-deviceid.patch @@ -0,0 +1,38 @@ +diff -up cups-1.5b1/backend/dnssd.c.dnssd-deviceid cups-1.5b1/backend/dnssd.c +--- cups-1.5b1/backend/dnssd.c.dnssd-deviceid 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.5b1/backend/dnssd.c 2011-05-24 17:28:18.000000000 +0200 +@@ -817,15 +817,22 @@ query_callback( + 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 (!_cups_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 (!_cups_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) + { + /* +@@ -835,7 +842,7 @@ query_callback( + 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); + } + } |