GNOME Bugzilla – Bug 712751
Don't wake up Avahi printers unnecessarily
Last modified: 2013-11-21 14:46:27 UTC
Created attachment 260333 [details] [review] Don't wake up Avahi printers unnecessarily When an Avahi printer is queried for details by an IPP request it can happen that the printer will be woken up if it was sleeping before. Attached patch separates addition of discovered Avahi printers to printers list and getting of their details. The getting of details (an IPP request) is moved to gtk_printer_request_details() as was designed originally. Initial informations about printer (name, location, uri) are taken from TXT records provided by Avahi. The only consequence is that user won't see state of the printer before selecting it because it is not included in the TXT records (there is "printer-state" for CUPS printers but it doesn't tell whether the printer is paused). Marek
Review of attachment 260333 [details] [review]: ::: modules/printbackends/cups/gtkprintbackendcups.c @@ +2554,3 @@ + info->remote_printer = FALSE; + + if (data->printer_type & 0x00080000) Might be good to define constants for these bits here.
Created attachment 260447 [details] [review] Don't wake up Avahi printers unnecessarily These constants are actually in cups.h already.
Review of attachment 260447 [details] [review]: looks fine now, thanks
Comment on attachment 260447 [details] [review] Don't wake up Avahi printers unnecessarily Thank you for the review. I've pushed the patch to master.