Blame SOURCES/cups-dnssd-deviceid.patch

3635cf
diff -up cups-2.1.4/backend/dnssd.c.dnssd-deviceid cups-2.1.4/backend/dnssd.c
3635cf
--- cups-2.1.4/backend/dnssd.c.dnssd-deviceid	2016-06-15 14:36:19.922353606 +0200
3635cf
+++ cups-2.1.4/backend/dnssd.c	2016-06-15 14:45:45.794966648 +0200
3635cf
@@ -1188,15 +1188,22 @@ query_callback(
3635cf
   if (device->device_id)
3635cf
     free(device->device_id);
3635cf
 
3635cf
+if (device_id[0])
3635cf
+{
3635cf
+  /* Mark this as the real device ID. */
3635cf
+  ptr = device_id + strlen(device_id);
3635cf
+  snprintf(ptr, sizeof(device_id) - (ptr - device_id), "FZY:0;");
3635cf
+}
3635cf
+
3635cf
   if (!device_id[0] && strcmp(model, "Unknown"))
3635cf
   {
3635cf
     if (make_and_model[0])
3635cf
-      snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;",
3635cf
+      snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;",
3635cf
 	       make_and_model, model);
3635cf
     else if (!_cups_strncasecmp(model, "designjet ", 10))
3635cf
-      snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s;", model + 10);
3635cf
+      snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s;FZY:1;", model + 10);
3635cf
     else if (!_cups_strncasecmp(model, "stylus ", 7))
3635cf
-      snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s;", model + 7);
3635cf
+      snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s;FZY:1;", model + 7);
3635cf
     else if ((ptr = strchr(model, ' ')) != NULL)
3635cf
     {
3635cf
      /*
3635cf
@@ -1206,7 +1213,7 @@ query_callback(
3635cf
       memcpy(make_and_model, model, (size_t)(ptr - model));
3635cf
       make_and_model[ptr - model] = '\0';
3635cf
 
3635cf
-      snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;",
3635cf
+      snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;",
3635cf
 	       make_and_model, ptr + 1);
3635cf
     }
3635cf
   }