New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cupsGetDests2 only shows Discovered printer when using http=CUPS_HTTP_DEFAULT #5925
Comments
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 |
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-Client-Examples.zip
You will note that the cupsGetDests2 call never sees the fully configured version of the printer.
The cupsEnumDests always sees two entries for the printer, one fully configured and the other
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:
The application can be configured to use a print server url and if done so it passes this in as the http parameter instead of the
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:
cups/cups/dest.c
Line 1691 in 64160c2
Your inputs on this would be very appreciated.
The text was updated successfully, but these errors were encountered: