}
}
- if (found_device_list) {
- device = g_list_nth_data(found_device_list, idx - 1);
- if (NULL == device) {
- msgr("Failed to g_hash_table_find");
- return RET_FAILURE;
- }
+ if (NULL == found_device_list) {
+ msgr("Find device first");
+ return RET_FAILURE;
+ }
+
+ device = g_list_nth_data(found_device_list, idx - 1);
+ if (NULL == device) {
+ msgr("Failed to g_hash_table_find");
+ return RET_FAILURE;
}
ret = companion_device_eject(group, device, _device_eject_result_cb, NULL );
}
}
- if (found_device_list) {
- device = g_list_nth_data(found_device_list, idx - 1);
- if (NULL == device) {
- msgr("Failed to g_hash_table_find");
- return RET_FAILURE;
- }
+ if (NULL == found_device_list) {
+ msgr("Find device first");
+ return RET_FAILURE;
+ }
+
+ device = g_list_nth_data(found_device_list, idx - 1);
+ if (NULL == device) {
+ msgr("Failed to g_hash_table_find");
+ return RET_FAILURE;
}
ret = companion_device_invite(group, device, pin,_device_invite_result_cb, NULL );
msg("");
- ret = companion_device_get_found_devices(&devices, &count);
+ ret = companion_device_get_found_mowned_devices(&devices, &count);
if (COMP_ERROR_NONE != ret) {
msgr("Failed to Get Found Devices: [%s(0x%X)]", comp_error_to_string(ret), ret);
return RET_FAILURE;
}
- msg(" - companion_device_get_found_devices() ret: [0x%X] [%s]", ret, comp_error_to_string(ret));
+ msg(" - companion_device_get_found_mowned_devices() ret: [0x%X] [%s]", ret, comp_error_to_string(ret));
for (int i = 0; i < count; i++) {
char *device_id = NULL;