[gnome-bluetooth] lib: Don't return with an error there's no services
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Don't return with an error there's no services
- Date: Tue, 17 Jan 2012 19:51:01 +0000 (UTC)
commit 109ee534b97c6f24c9c5ec04ee8b4c0d38a2c2aa
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 17 19:09:47 2012 +0000
lib: Don't return with an error there's no services
lib/bluetooth-client.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 4a94c8e..938c70e 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1729,6 +1729,7 @@ bluetooth_client_connect_service (BluetoothClient *client,
GHashTable *table;
GtkTreeIter iter;
guint i;
+ gboolean res;
g_return_if_fail (BLUETOOTH_IS_CLIENT (client));
g_return_if_fail (device != NULL);
@@ -1737,6 +1738,7 @@ bluetooth_client_connect_service (BluetoothClient *client,
callback,
user_data,
bluetooth_client_connect_service);
+ res = FALSE;
if (get_iter_from_path (priv->store, &iter, device) == FALSE)
goto bail;
@@ -1762,6 +1764,7 @@ bluetooth_client_connect_service (BluetoothClient *client,
if (connect && table == NULL) {
g_object_unref (proxy);
+ res = TRUE;
goto bail;
} else if (connect) {
const char *iface_name;
@@ -1819,7 +1822,7 @@ bluetooth_client_connect_service (BluetoothClient *client,
return;
bail:
- g_simple_async_result_set_op_res_gboolean (simple, FALSE);
+ g_simple_async_result_set_op_res_gboolean (simple, res);
g_simple_async_result_complete (simple);
g_object_unref (simple);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]