39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
diff -up cups-2.0rc1/backend/dnssd.c.dnssd-deviceid cups-2.0rc1/backend/dnssd.c
|
|
--- cups-2.0rc1/backend/dnssd.c.dnssd-deviceid 2014-06-30 16:27:01.000000000 +0200
|
|
+++ cups-2.0rc1/backend/dnssd.c 2014-09-12 14:08:38.624252208 +0200
|
|
@@ -1196,15 +1196,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)
|
|
{
|
|
/*
|
|
@@ -1214,7 +1221,7 @@ query_callback(
|
|
memcpy(make_and_model, model, (size_t)(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);
|
|
}
|
|
}
|