summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-08-16 13:36:37 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-08-16 14:13:57 (GMT)
commita669c2da5024befaa2db4d7213209355bdd5307a (patch)
treee7d1109712ff1a0b32d0cd0157178588b9855728 /plugins
parent9fc0a3a605a38822497b3dc4ecedba8005bf85d4 (diff)
downloadconnman-a669c2da5024befaa2db4d7213209355bdd5307a.zip
connman-a669c2da5024befaa2db4d7213209355bdd5307a.tar.gz
connman-a669c2da5024befaa2db4d7213209355bdd5307a.tar.bz2
bluetooth: Add the device into hash table when relevant
Fixes BMC#25215
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bluetooth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 44d32d1..2af0201 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -705,8 +705,6 @@ static void adapter_properties_reply(DBusPendingCall *call, void *user_data)
if (device != NULL)
goto update;
- g_hash_table_insert(bluetooth_devices, g_strdup(path), device);
-
ether_aton_r(address, &addr);
snprintf(ident, 13, "%02x%02x%02x%02x%02x%02x",
@@ -721,6 +719,8 @@ static void adapter_properties_reply(DBusPendingCall *call, void *user_data)
if (device == NULL)
goto done;
+ g_hash_table_insert(bluetooth_devices, g_strdup(path), device);
+
connman_device_set_ident(device, ident);
connman_device_set_string(device, "Path", path);