summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-07-11 16:01:54 -0300
committerLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-07-28 10:37:58 -0300
commit0b91ee8fa46e3a163efb851d8e9d7b29dc39d48f (patch)
tree7eca461e09e899f6d261d04788052e1ac9d26ccf
parent298878a17905e1cf34f284f57da16a5deea123b5 (diff)
Prevent loading devices from store when they are already loaded.
-rw-r--r--hcid/manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hcid/manager.c b/hcid/manager.c
index 2ed7a6e6..ac08d301 100644
--- a/hcid/manager.c
+++ b/hcid/manager.c
@@ -911,6 +911,10 @@ static void create_stored_device_from_profiles(char *key, char *value,
GSList *uuids = bt_string2list(value);
struct btd_device *device;
+ if (g_slist_find_custom(adapter->devices,
+ key, (GCompareFunc) device_address_cmp))
+ return;
+
device = device_create(connection, adapter, key);
if (device) {
device_set_temporary(device, FALSE);