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 };
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;