Less errors from the cups backend
PATCH 1/1 Less errors from the cups backend
Avoids filling up /var/log/messages, as seen in:
https://bugzilla.redhat.com/show_bug.cgi?id=507572
Cheers
Quoted 1 line
From
c260d9aa469347bc11c6b61944bf130deb6a2e04Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Wed, 24 Jun 2009 18:01:27 +0100
Subject: [PATCH] Less errors from the cups backend
Don't error out when either D-Bus isn't available, bluetoothd isn't running, or there's no adapters.
--- cups/main.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
cups/main.c +5 -4
@@ -536,15 +536,15 @@ static gboolean list_printers(void) conn =g_dbus_setup_bus (DBUS_BUS_SYSTEM ,NULL ,NULL );if (conn ==NULL ) -return FALSE; +return TRUE;dbus_error_init (&error); hcid_exists =dbus_bus_name_has_owner (conn,"org.bluez" , &error);if (&error !=NULL &&dbus_error_is_set (&error)) -return FALSE; +return TRUE;if (!hcid_exists) -return FALSE; +return TRUE;/* Get the default adapter */ message = dbus_message_new_method_call("org.bluez", "/",
@@ -562,7 +562,8 @@ static gboolean list_printers(void)if (&error !=NULL &&dbus_error_is_set (&error)) {dbus_connection_unref (conn); -return FALSE; +/* No adapter */ +return TRUE; }dbus_message_iter_init (reply, &reply_iter);
Signature · 1 line
1.6.2.2
Marcel Holtmann
maintainerHi Bastien,
Quoted 2 lines
Avoids filling up
/var/log/messages, as seen in:
https://bugzilla.redhat.com/show_bug.cgi?id=507572
patch has been applied. Thanks.
Regards
Marcel