Fixed AVRCP controller reply pending request
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-adapter.c
index eb358f2..078bca7 100644 (file)
@@ -1228,7 +1228,7 @@ static gboolean __bt_disconnect_all(void)
        GVariant *result;
        GError *error = NULL;
        GArray *device_list;
-       bluetooth_device_info_t info;
+       bluetooth_device_info_t *info;
        guint size;
        char *device_path = NULL;
        char address[BT_ADDRESS_STRING_SIZE] = { 0 };
@@ -1250,12 +1250,12 @@ static gboolean __bt_disconnect_all(void)
 
        for (i = 0; i < size; i++) {
 
-               info = g_array_index(device_list,
+               info = &g_array_index(device_list,
                                bluetooth_device_info_t, i);
 
-               if (info.connected != BLUETOOTH_CONNECTED_LINK_NONE) {
+               if (info->connected != BLUETOOTH_CONNECTED_LINK_NONE) {
                        BT_DBG("Found Connected device");
-                       _bt_convert_addr_type_to_string(address, info.device_address.addr);
+                       _bt_convert_addr_type_to_string(address, info->device_address.addr);
                        device_path = _bt_get_device_object_path(address);
                        if (device_path == NULL)
                                continue;