[gnome-bluetooth/gnome-2-28] Don't overwrite UUIDs when discovering known device
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/gnome-2-28] Don't overwrite UUIDs when discovering known device
- Date: Fri, 25 Sep 2009 15:59:11 +0000 (UTC)
commit 3eee0dd0eaa609eb35c9792d1ef3c5e31d9fb6d8
Author: Bastien Nocera <hadess hadess net>
Date: Fri Sep 25 16:42:43 2009 +0100
Don't overwrite UUIDs when discovering known device
The device is already known, but the discovery information won't
include any UUIDs information, so don't overwrite the existing one.
Also don't crash when the proxy isn't set in dump_devices().
lib/bluetooth-client.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index ff3a01f..6dd7a6e 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -727,9 +727,13 @@ static void add_device(DBusGProxy *adapter, GtkTreeIter *parent,
BLUETOOTH_COLUMN_TYPE, type,
BLUETOOTH_COLUMN_ICON, icon,
BLUETOOTH_COLUMN_RSSI, rssi,
- BLUETOOTH_COLUMN_UUIDS, uuids,
BLUETOOTH_COLUMN_LEGACYPAIRING, legacypairing,
-1);
+ if (uuids != NULL) {
+ gtk_tree_store_set(priv->store, &iter,
+ BLUETOOTH_COLUMN_UUIDS, uuids,
+ -1);
+ }
if (device != NULL) {
services = device_list_nodes (device, client, FALSE);
@@ -1889,7 +1893,8 @@ bluetooth_client_dump_device (GtkTreeModel *model,
g_free (alias);
g_free (address);
g_free (icon);
- g_object_unref (proxy);
+ if (proxy != NULL)
+ g_object_unref (proxy);
if (services != NULL)
g_hash_table_unref (services);
g_strfreev (uuids);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]