summaryrefslogtreecommitdiff
path: root/plugins/bluetooth.c
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-08-16 16:36:37 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-08-16 17:13:57 +0300
commita669c2da5024befaa2db4d7213209355bdd5307a (patch)
treee7d1109712ff1a0b32d0cd0157178588b9855728 /plugins/bluetooth.c
parent9fc0a3a605a38822497b3dc4ecedba8005bf85d4 (diff)
downloadconnman-a669c2da5024befaa2db4d7213209355bdd5307a.tar.gz
connman-a669c2da5024befaa2db4d7213209355bdd5307a.tar.bz2
connman-a669c2da5024befaa2db4d7213209355bdd5307a.zip
bluetooth: Add the device into hash table when relevant
Fixes BMC#25215
Diffstat (limited to 'plugins/bluetooth.c')
-rw-r--r--plugins/bluetooth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 44d32d11..2af02015 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);