All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] remove log to make bluetooth.c a static library
@ 2010-07-18 22:57 Gustavo F. Padovan
  2010-07-18 22:57 ` [PATCH 2/4] bluetooth: move uuid to struct bluetooth_profile Gustavo F. Padovan
  0 siblings, 1 reply; 10+ messages in thread
From: Gustavo F. Padovan @ 2010-07-18 22:57 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3525 bytes --]

---
 plugins/bluetooth.c |   27 +++------------------------
 1 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 5a85eaa..1079838 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -77,7 +77,6 @@ int bluetooth_send_with_reply(const char *path, const char *interface,
 	msg = dbus_message_new_method_call(BLUEZ_SERVICE, path,
 						interface, method);
 	if (!msg) {
-		ofono_error("Unable to allocate new D-Bus %s message", method);
 		err = -ENOMEM;
 		goto fail;
 	}
@@ -96,7 +95,6 @@ int bluetooth_send_with_reply(const char *path, const char *interface,
 		timeout *= 1000;
 
 	if (!dbus_connection_send_with_reply(connection, msg, &call, timeout)) {
-		ofono_error("Sending %s failed", method);
 		err = -EIO;
 		goto fail;
 	}
@@ -246,18 +244,11 @@ static void device_properties_cb(DBusPendingCall *call, gpointer user_data)
 
 	reply = dbus_pending_call_steal_reply(call);
 
-	if (dbus_message_is_error(reply, DBUS_ERROR_SERVICE_UNKNOWN)) {
-		DBG("Bluetooth daemon is apparently not available.");
+	if (dbus_message_is_error(reply, DBUS_ERROR_SERVICE_UNKNOWN))
 		goto done;
-	}
-
-	if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
-		if (!dbus_message_is_error(reply, DBUS_ERROR_UNKNOWN_METHOD))
-			ofono_info("Error from GetProperties reply: %s",
-					dbus_message_get_error_name(reply));
 
+	if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
 		goto done;
-	}
 
 	bluetooth_parse_properties(reply, "UUIDs", has_uuid, &have_uuid,
 				"Adapter", parse_string, &adapter,
@@ -285,8 +276,6 @@ static void parse_devices(DBusMessageIter *array, gpointer user_data)
 	DBusMessageIter value;
 	GSList **device_list = user_data;
 
-	DBG("");
-
 	if (dbus_message_iter_get_arg_type(array) != DBUS_TYPE_ARRAY)
 		return;
 
@@ -380,7 +369,6 @@ static void adapter_properties_cb(DBusPendingCall *call, gpointer user_data)
 	reply = dbus_pending_call_steal_reply(call);
 
 	if (dbus_message_is_error(reply, DBUS_ERROR_SERVICE_UNKNOWN)) {
-		DBG("Bluetooth daemon is apparently not available.");
 		goto done;
 	}
 
@@ -389,7 +377,6 @@ static void adapter_properties_cb(DBusPendingCall *call, gpointer user_data)
 					"Address", parse_string, &addr,
 					NULL);
 
-	DBG("Adapter Address: %s, Path: %s", addr, path);
 	g_hash_table_insert(adapter_address_hash,
 				g_strdup(path), g_strdup(addr));
 
@@ -439,8 +426,6 @@ static void parse_adapters(DBusMessageIter *array, gpointer user_data)
 {
 	DBusMessageIter value;
 
-	DBG("");
-
 	if (dbus_message_iter_get_arg_type(array) != DBUS_TYPE_ARRAY)
 		return;
 
@@ -452,8 +437,6 @@ static void parse_adapters(DBusMessageIter *array, gpointer user_data)
 
 		dbus_message_iter_get_basic(&value, &path);
 
-		DBG("Calling GetProperties on %s", path);
-
 		bluetooth_send_with_reply(path, BLUEZ_ADAPTER_INTERFACE,
 				"GetProperties", adapter_properties_cb,
 				g_strdup(path), g_free, -1, DBUS_TYPE_INVALID);
@@ -468,12 +451,8 @@ static void manager_properties_cb(DBusPendingCall *call, gpointer user_data)
 
 	reply = dbus_pending_call_steal_reply(call);
 
-	if (dbus_message_is_error(reply, DBUS_ERROR_SERVICE_UNKNOWN)) {
-		DBG("Bluetooth daemon is apparently not available.");
+	if (dbus_message_is_error(reply, DBUS_ERROR_SERVICE_UNKNOWN))
 		goto done;
-	}
-
-	DBG("");
 
 	bluetooth_parse_properties(reply, "Adapters", parse_adapters, NULL,
 						NULL);
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-19  1:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-18 22:57 [PATCH 1/4] remove log to make bluetooth.c a static library Gustavo F. Padovan
2010-07-18 22:57 ` [PATCH 2/4] bluetooth: move uuid to struct bluetooth_profile Gustavo F. Padovan
2010-07-18 22:57   ` [PATCH 3/4] bluetooth: do not use ofono_dbus_get_connection Gustavo F. Padovan
2010-07-18 22:57     ` [PATCH 4/4] make bluetooth.{c,h} a static library Gustavo F. Padovan
2010-07-18 23:01       ` Marcel Holtmann
2010-07-18 23:05         ` Gustavo F. Padovan
2010-07-18 23:10           ` Marcel Holtmann
2010-07-18 23:23             ` Gustavo F. Padovan
2010-07-18 23:34               ` Marcel Holtmann
2010-07-19  1:39                 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.