From: Tomasz Bursztyka Date: Thu, 16 Aug 2012 13:36:37 +0000 (+0300) Subject: bluetooth: Add the device into hash table when relevant X-Git-Tag: 1.6~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a669c2da5024befaa2db4d7213209355bdd5307a;p=platform%2Fupstream%2Fconnman.git bluetooth: Add the device into hash table when relevant Fixes BMC#25215 --- 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);