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
Auto discovered network printers shows up twice (with cupsEnumDest()) #5017
Comments
What version of CUPS are you using? We recently fixed some bugs in this area in Github master... |
I am using the lastest snapshot from this repo. |
Hmm, can you attach the output of "lpstat -ev"? |
Here is the output of Generic-CUPS-PDF-Printer |
OK, there was a bug in the lpstat program - it didn't parse the command-line arguments correctly so you are getting the -e output twice... Please try again. |
Here is the output of lpstat -ev Generic-CUPS-PDF-Printer These are manually configured printers. The output of the program using cupsEnumDests() is: Generic-CUPS-PDF-Printer |
OK, so you need to suppress duplicate destinations yourself in your application - I will make sure this is documented clearly. Basically, cupsEnumDests is providing you with updates to existing queues as we get responses from Avahi (on Linux) or mDNSResponder (on macOS). See the sample code in the new CUPS Programming Manual (available on the CUPS web site under the "help" tab) for an example that uses cupsEnumDests to assemble an array of CUPS destinations (like cupsGetDests does, just under your code's control...) |
destination during enumeration (Issue #5017)
Sorry to bump this thread. I'm using Thanks in advance. |
I set up a pdf printer on a remote machine in the subnet(Simpulated through a virtual machine in bridged adapter mode) and shared it.
When I start my cups scheduler on the remote machine, the discovered printer shows up twice on the list.
I use
cupsEnumDests(CUPS_DEST_FLAGS_NONE, -1, NULL, CUPS_PRINTER_LOCAL, CUPS_PRINTER_REMOTE, printDestName, NULL)
to enumerate the printers.Here printDestName is a callback function which prints the printer name to stdout.
All the other printers show up once; just each of the network printers show up twice.
The text was updated successfully, but these errors were encountered: