[HIGH] STR #4158: DNS-SD-based print queues pointing to CUPS server are not considered remote printers with driver on server

Till Kamppeter <[email protected]>
Newsgroups gmane.comp.printing.cups.bugs
Message-ID <[email protected]>
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

In times of CUPS broadcasting the automatically created queues on the
clients had "ipp://..." URIs and they were correctly considered printers
on a remote CUPS server with driver on the server. Also manually created
raw queues with appropriate "ipp://..." URIs pointing to a CUPS server
were considered as such. Now without broadcasting and with printers often
getting changing IPs from DHCP servers one would use "dnssd://..." URIs
for such queues, but with these URIs the queues are not considered as
pointing to a remote CUPS server.

The attached patch corrects this.

Link: http://www.cups.org/str.php?L4158
Version: 1.6-current

_______________________________________________
cups-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/cups-bugs
recognize-remote-cups-queue-via-dnssd-uri.patch (text/plain, 1.1 KB)
diff -uraN cups/scheduler/printers.c cups-new/scheduler/printers.c
--- cups/scheduler/printers.c	2012-05-25 15:28:49.000000000 +0200
+++ cups-new/scheduler/printers.c	2012-08-04 20:58:40.475725544 +0200
@@ -4829,13 +4829,14 @@
 		   "printer-make-and-model", NULL,
 		   "Local System V Printer");
     }
-    else if (!strncmp(p->device_uri, "ipp://", 6) &&
-	     (strstr(p->device_uri, "/printers/") != NULL ||
-	      strstr(p->device_uri, "/classes/") != NULL ||
-	      ((strstr(p->device_uri, "._ipp.") != NULL ||
-	        strstr(p->device_uri, "._ipps.") != NULL) &&
-	       !strcmp(p->device_uri + strlen(p->device_uri) - 5,
-		       "/cups"))))
+    else if ((!strncmp(p->device_uri, "ipp://", 6) &&
+	      (strstr(p->device_uri, "/printers/") != NULL ||
+	       strstr(p->device_uri, "/classes/") != NULL)) ||
+	     (!strncmp(p->device_uri, "dnssd://", 8) &&
+	      (strstr(p->device_uri, "._ipp.") != NULL ||
+	       strstr(p->device_uri, "._ipps.") != NULL) &&
+	      !strcmp(p->device_uri + strlen(p->device_uri) - 5,
+		      "/cups")))
     {
      /*
       * Tell the client this is really a hard-wired remote printer.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.