For a raw queue pointing to a remote CUPS server via dnssd URI the options of the server's PPD are not shown by print dialogs #4159

Closed
michaelrsweet opened this Issue Aug 7, 2012 · 3 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Aug 7, 2012

Version: 1.6.1
CUPS.org User: till.kamppeter

Now, where CUPS broadcasting has been dropped in CUPS 1.6.x, a printer on a remote CUPS server can only be accessed by creating a queue pointing to the printer's queue on the remote server. Usually one creates a raw queue so that the driver on the server gets used.

If one creates such a queue with an IPP URI, of the form "ipp:///printers/" (the URIs which the implicit queues on clients which listened to the CUPS broadcasting had), print dialogs of applications get the PPD file information of the server's queue and display the appropriate options.

As CUPS 1.6.x broadcasts via DNS-SD/Bonjour, queues on clients get often created with dnssd URIs of the form "dnssd://._ipp._tcp.local/cups" and also as raw queue to use the driver of the server's queue. For these queues the dialogs are not able to retrieve the PPD info from the server, even not with the patch of STR #4158 applied.

As client I am using CUPS 1.6.1 on Ubuntu Quantal 12.10 (with Avahi) and my patches of STR #4156, STR #4157, STR #4158, and STR #4155.

As server I use CUPS 1.5.3 (with many fixes of 1.5.4) on Ubuntu Precise 12.04 LTS.

I have also tried to change the roles of client and server and have the same problem.

Collaborator

michaelrsweet commented Aug 8, 2012

CUPS.org User: mike

P2; statically configured queues such as these are deprecated - see the new dynamic queue APIs...

That said, we can accept dnssd: URIs and resolve them to IPP/IPPS URIs (like we already do for ipp:/ipps: URIs) in cupsGetPPD.

Collaborator

michaelrsweet commented Aug 29, 2012

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Aug 29, 2012

"str4159.patch":

Index: cups/util.c

--- cups/util.c (revision 10572)
+++ cups/util.c (working copy)
@@ -1636,6 +1636,7 @@
/* Hostname associated with connection /
static const char * const requested_attrs[] =
{ /
Requested attributes */

  •     "device-uri",
      "member-uris",
      "printer-uri-supported",
      "printer-type"
    

    @@ -1696,9 +1697,34 @@

    if ((response = cupsDoRequest(http, request, "/")) != NULL)
    {

  • if ((attr = ippFindAttribute(response, "member-uris", IPP_TAG_URI)) != NULL)

  • const char device_uri = NULL; / device-uri value */

  • if ((attr = ippFindAttribute(response, "device-uri",
  •                             IPP_TAG_URI)) != NULL)
    
  •  device_uri = attr->values[0].string.text;
    
  • if (device_uri &&
  •    ((strstr(device_uri, "._ipp.") != NULL ||
    
  •      strstr(device_uri, "._ipps.") != NULL) &&
    
  •     !strcmp(device_uri + strlen(device_uri) - 5, "/cups")))
    
    {
    /*
  •  \* Statically-configured Bonjour shared printer.
    
  •  */
    
  •  httpSeparateURI(HTTP_URI_CODING_ALL,
    
  •                  _httpResolveURI(device_uri, uri, sizeof(uri),
    
  •                                  _HTTP_RESOLVE_DEFAULT, NULL, NULL),
    
  •                  scheme, sizeof(scheme), username, sizeof(username),
    
  •         host, hostsize, port, resource, resourcesize);
    
  •  ippDelete(response);
    
  •  return (1);
    
  • }
  • else if ((attr = ippFindAttribute(response, "member-uris",
  •                                  IPP_TAG_URI)) != NULL)
    
  • {
  • /*
    
    • Get the first actual printer name in the class...
      */

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment