Open cregganna opened 3 years ago
Hi again, Just gently giving this a bump.
Can we have some direction on this please - maybe answering the question:
Many Thanks
@cregganna You should probably report this to the OpenPrinting CUPS repository, as Apple is no longer providing assistance for Linux users of CUPS and my access to this repository is extremely limited at the moment...
That said, cupsGetDests2 and cupsEnumDests should return substantially the same list of destinations since cupsGetDests2 is implemented using cupsEnumDests in CUPS 2.3.x - the only differences might be for printers that don't response immediately to a discovery query. Generally speaking, interactive applications should use cupsEnumDests while non-interactive applications should use cupsGetDests2.
As for why you aren't seeing the printer, cups-browsed will normally create a queue for every printer it sees (which is actually not what I'd like to see, since CUPS can dynamically create a queue as needed), but the "discovered" queue can be used with the CUPS API and CUPS will automatically create a queue for it.
@cregganna Oh, and just re-reading your original message, cupsGetDests2 only enumerates printers when the HTTP connection is local (either CUPS_HTTP_DEFAULT
or an explicit connection to the domain socket or localhost IP sockets...)
Michael, thanks for your reply - I did not fully understand that the cups running on my own Linux box was not from this repo - I will post the same question in OpenPrinting CUPS.
Note though, that Apple users are also reporting this issue.
Not sure if this is actually an issue - I'm looking more for advice on whether this is a setup issue or just that one should be using cupsEnumDests rather than cupsGetDests2.
I have a Linux application that uses cupsGetDests2 with http=CUPS_HTTP_DEFAULT to enumerate the printers to present to the user. It mostly fails to show the only printer on the network - all other applications on the box correctly show the printer is available.
The setup is:
CUPS_PRINTER_DISCOVERED
one./var/run/cups/cups.sock
The application concerned tries to filter out the
CUPS_PRINTER_DISCOVERED
printer after calling the cupsGetDests2 and this results in no printers being available.Sorry about the long ramble but finally to my questions:
CUPS_HTTP_DEFAULT
- I see that cupsEnumDests does not take an http paramater.cups_get_cb
) building the dests pointer array and removing duplicates it overwrites the fully configured printer definition with theCUPS_PRINTER_DISCOVERED
one - so losing the configured one. As such - should the cupsGetDests2 call also mask out Discovered printers for local printer enumerations? See here: https://github.com/apple/cups/blob/64160c2a228287160e4521dabf2f18bee4eb7e97/cups/dest.c#L1691Your inputs on this would be very appreciated.