mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 09:40:10 +00:00
printing: If we cannot contact Avahi, debug-log the error message
If we get a G_IO_ERROR_DBUS_ERROR here, we shouldn't make too much noise about it by default, but it's still a useful data point for debugging and diagnosis. Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
parent
0d650bd9d2
commit
7dc72303aa
@ -3547,8 +3547,9 @@ avahi_service_browser_new_cb (GObject *source_object,
|
||||
* The creation of ServiceBrowser fails with G_IO_ERROR_DBUS_ERROR
|
||||
* if Avahi is disabled.
|
||||
*/
|
||||
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR) &&
|
||||
!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR))
|
||||
g_debug ("%s #%d: %s", g_quark_to_string (error->domain), error->code, error->message);
|
||||
else if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user