Created attachment 995675 [details] Store CUPS_PRINTER_REJECTING also in "Type" field in printers.conf Description of problem: CUPS doesn't set CUPS_PRINTER_REJECTING flag in "printer-type" TXT record. This flag is important if we want to avoid waking up all printers just to know their state. Version-Release number of selected component (if applicable): cups-1.7.5-15.fc21 How reproducible: Always Steps to Reproduce: 1. Set sharing of a printer over dnssd 2. cupsreject the-printer 3. look at printer-type TXT record of the printer Actual results: CUPS_PRINTER_REJECTING is not set Expected results: CUPS_PRINTER_REJECTING is set Additional info: It would help to finish fixing of this bug: https://bugzilla.gnome.org/show_bug.cgi?id=743323.
Created attachment 995703 [details] Store CUPS_PRINTER_REJECTING also in "Type" field in printers.conf This patch works better because the original type is still stored somewhere when I set the printer to accept jobs again. It results in Accepting set to "Yes" and Type with the CUPS_PRINTER_REJECTING flag still set without this patch.
Created attachment 995960 [details] Git-format patch against master I think you mean something like this. The printers.conf file already stores the accepting state for each printer, and when constructing printer-type for IPP attributes the Type field is combined with the Accepting field. It wasn't happening when constructing printer-type for the DNS-SD TXT record though.
(In reply to Tim Waugh from comment #2) > Created attachment 995960 [details] > Git-format patch against master > > I think you mean something like this. The printers.conf file already stores > the accepting state for each printer, and when constructing printer-type for > IPP attributes the Type field is combined with the Accepting field. It > wasn't happening when constructing printer-type for the DNS-SD TXT record > though. Thank you, yes this is better solution. Just one observation, if I call "cupsreject/cupsaccept", the TXT record is not changed immediately so I run "cupsenable/cupsdisable" to ensure that the change is propagated to the TXT record. Would it be possible to update the TXT record when the accepting state changes?
Created attachment 996048 [details] Git-format patch against master Try this.
Unfortunately, CUPS doesn't update the TXT record immediately with the patch.
We probably need to do something like cupsdSetPrinterState() does here: if (update) cupsdRegisterPrinter(p); which calls dnssdRegisterPrinter() which calls the dnssdBuildTxtRecord().
Created attachment 996090 [details] Git-format patch against master Ah, yes. OK, how about this one?
(In reply to Tim Waugh from comment #7) > Created attachment 996090 [details] > Git-format patch against master > > Ah, yes. OK, how about this one? Yes, this patch updates the rejecting flag immediately. Thank you very much.
Rejected upstream.