After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 712751 - Don't wake up Avahi printers unnecessarily
Don't wake up Avahi printers unnecessarily
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
3.11.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-11-20 15:56 UTC by Marek Kašík
Modified: 2013-11-21 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't wake up Avahi printers unnecessarily (18.33 KB, patch)
2013-11-20 15:56 UTC, Marek Kašík
reviewed Details | Review
Don't wake up Avahi printers unnecessarily (18.36 KB, patch)
2013-11-21 14:31 UTC, Marek Kašík
committed Details | Review

Description Marek Kašík 2013-11-20 15:56:20 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
Comment 1 Matthias Clasen 2013-11-20 23:08:31 UTC
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.
Comment 2 Marek Kašík 2013-11-21 14:31:58 UTC
Created attachment 260447 [details] [review]
Don't wake up Avahi printers unnecessarily

These constants are actually in cups.h already.
Comment 3 Matthias Clasen 2013-11-21 14:38:28 UTC
Review of attachment 260447 [details] [review]:

looks fine now, thanks
Comment 4 Marek Kašík 2013-11-21 14:46:10 UTC
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.