Skip to contentSkip to conversation

cups-browsed: how to treat rejecting queues?

Printing-architecture Tim Waugh 3 participants 6 messages Nov 4, 2013 – Nov 8, 2013

lore
Share & tools
lore

Tim Waugh

author
#0 lore raw

When cups-browsed creates local queues to forward jobs to remote queues, I wonder how it should treat queues that are not accepting jobs? The way cupsd used to behave was to copy the remote printer's state to the local implicit queue, but cups-browsed is not structured in that way: it doesn't update the queues it creates.

The problem with the current behaviour is that the GTK+ print dialog will allow a queue rejecting jobs to be selected.

See also discussion of this for Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1025263

Tim.
*/

#1 lore raw

Tim, one can solve the problem, cups-browsed updates queues on changes in the Bonjour record from the server (but not sure whether on all changes). Rejecting jobs is encoded in the printer-type TXT field, by the 0x80000 bit. See /usr/include/cups/cups.h, CUPS_PRINTER_REJECTING constant.

So it should be possible to implement that the cups-browsed queue follows the accepting bit of its remote queue.

Till

Quoted 15 lines · Tim Waugh

When cups-browsed creates local queues to forward jobs to remote queues, I wonder how it should treat queues that are not accepting jobs? The way cupsd used to behave was to copy the remote printer's state to the local implicit queue, but cups-browsed is not structured in that way: it doesn't update the queues it creates.

The problem with the current behaviour is that the GTK+ print dialog will allow a queue rejecting jobs to be selected.

See also discussion of this for Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1025263

Tim.
*/

#3 lore raw
In reply to Tim Waugh
Quoted 6 lines · Tim Waugh

When cups-browsed creates local queues to forward jobs to remote queues, I wonder how it should treat queues that are not accepting jobs? The way cupsd used to behave was to copy the remote printer's state to the local implicit queue, but cups-browsed is not structured in that way: it doesn't update the queues it creates.

Quoted 9 lines

The problem with the current behaviour is that the GTK+ print dialog will allow a queue rejecting jobs to be selected.

See also discussion of this for Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1025263

Tim.
*/

I have checked further, cups-browsed indeed does not update queues on Bonjour record changes, the update to https is triggered by a completely new Bonjour broadcast.

I have also tried to switch a printer on my server between accepting and rejecting state, and this does not make CUPS/Avahi generating an update of the Bonjour record (= sending a broadcast), avahi-discover on a client did not show any evidence of a signal broadcasted because of this change. Can this be a bug in CUPS which we should report?

Till

#4 lore raw

Till,

Quoted 6 lines · Till Kamppeter

...
I have also tried to switch a printer on my server between accepting and rejecting state, and this does not make CUPS/Avahi generating an update of the Bonjour record (= sending a broadcast), avahi-discover on a client did not show any evidence of a signal broadcasted because of this change. Can this be a bug in CUPS which we should report?

This is a conscious design decision for cupsd - we do not re-register the TXT records on simple state changes.

Conceptually we might want to stop sharing a printer that is not accepting jobs. Something to think about…

____________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

#5 lore raw
Quoted 10 lines · Michael Sweet

Till,

Quoted 6 lines · Till Kamppeter

...
I have also tried to switch a printer on my server between accepting and rejecting state, and this does not make CUPS/Avahi generating an update of the Bonjour record (= sending a broadcast), avahi-discover on a client did not show any evidence of a signal broadcasted because of this change. Can this be a bug in CUPS which we should report?

Quoted 3 lines

This is a conscious design decision for cupsd - we do not re-register the TXT records on simple state changes.

Conceptually we might want to stop sharing a printer that is not accepting jobs. Something to think about…

Yes, I think this would be a good idea.

Till

author
#2 lore raw
In reply to Till Kamppeter
Quoted 5 lines · Till Kamppeter

Tim, one can solve the problem, cups-browsed updates queues on changes in the Bonjour record from the server (but not sure whether on all changes). Rejecting jobs is encoded in the printer-type TXT field, by the 0x80000 bit. See /usr/include/cups/cups.h, CUPS_PRINTER_REJECTING constant.

OK. It should also update the existing queue states when using BrowsePoll as well. I can look at that if you like.

Tim.
*/