-
Notifications
You must be signed in to change notification settings - Fork 267
Description
I create a CUPS queue on my locally installed CUPS and share it (turn sharing for CUPS on and also mark the printer itself shared). On remote machines it gets visible by that, as expected.
Now I call cupsEnumDests() like this:
cupsEnumDests(CUPS_DEST_FLAGS_NONE, 1000, NULL, 0, 0,
(cups_dest_cb_t)add_dest_cb, dest_list);
to let the callback function add_dest_cb() add all printers reported to dest_list.
In the end the list contains all permanent queues which I have created and it also contains the IPP printers discovered in the network (advertsed via DNS-SD).
This is all OK, but cupsEnumDests() also discovers the shared printers on my local CUPS. So if I have created a queue named printer and shared it and the host name of my local machine is my_cups_server, cupsEnumDests() also lists a discovered printer making up a temporary queue named printer_my_cups_server and when printing to it this queue gets created with the device URI ipps://my_cups_server:631/printers/printer making my CUPS daemon passing on a job to this queue to itself, into the queue printer.
cupsEnumDests() (or cupsd if it is doing the "dirty work" for this function) needs a filter to exclude temporary queues for shared
local (from the same cupsd) printers.