Skip to content

Commit 71e6b60

Browse files
Dimitar Tachevrosen-vladimirov
authored andcommitted
refactor: handle PR comments
Co-Authored-By: Rosen Vladimirov <[email protected]>
1 parent 1959a18 commit 71e6b60

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

IOSDeviceLib/IOSDeviceLib.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ int start_session(std::string& device_identifier)
134134
{
135135
const DeviceInfo* device_info = devices[device_identifier].device_info;
136136
UNLOCK_MUTEX_AND_RETURN_IF_FAILED_RESULT(AMDeviceConnect(device_info), start_session_mutex);
137-
assert(AMDeviceIsPaired(device_info));
138137
UNLOCK_MUTEX_AND_RETURN_IF_FAILED_RESULT(AMDeviceValidatePairing(device_info), start_session_mutex);
139138
UNLOCK_MUTEX_AND_RETURN_IF_FAILED_RESULT(AMDeviceStartSession(device_info), start_session_mutex);
140139
}
@@ -941,16 +940,15 @@ void get_application_infos(std::string device_identifier, std::string method_id)
941940
CFStringRef cf_return_attrs_key = create_CFString("ReturnAttributes");
942941
const void *client_opts_keys_arr[] = { cf_app_type_key, cf_return_attrs_key };
943942

944-
945-
CFStringRef cf_user_value = create_CFString("User");
946-
const void *client_opts_values_arr[] = { cf_user_value, cf_return_attributes_array };
943+
CFStringRef cf_app_type_value = create_CFString("User");
944+
const void *client_opts_values_arr[] = { cf_app_type_value, cf_return_attributes_array };
947945
CFDictionaryRef clinet_opts_dict = CFDictionaryCreate(NULL, client_opts_keys_arr, client_opts_values_arr, 2, NULL, NULL);
948946

949947
CFStringRef cf_command_key = create_CFString("Command");
950948
CFStringRef cf_client_options_key = create_CFString("ClientOptions");
951949
const void *keys_arr[] = { cf_command_key, cf_client_options_key };
952-
CFStringRef cf_browse_value = create_CFString("Browse");
953-
const void *values_arr[] = { cf_browse_value, clinet_opts_dict };
950+
CFStringRef cf_command_value = create_CFString("Browse");
951+
const void *values_arr[] = { cf_command_value, clinet_opts_dict };
954952
CFDictionaryRef dict_command = CFDictionaryCreate(NULL, keys_arr, values_arr, 2, NULL, NULL);
955953

956954
send_con_message(serviceInfo.connection, dict_command);
@@ -959,11 +957,11 @@ void get_application_infos(std::string device_identifier, std::string method_id)
959957
CFRelease(cf_return_attributes_array);
960958
CFRelease(cf_app_type_key);
961959
CFRelease(cf_return_attrs_key);
962-
CFRelease(cf_user_value);
960+
CFRelease(cf_app_type_value);
963961
CFRelease(clinet_opts_dict);
964962
CFRelease(cf_command_key);
965963
CFRelease(cf_client_options_key);
966-
CFRelease(cf_browse_value);
964+
CFRelease(cf_command_value);
967965
CFRelease(dict_command);
968966

969967
std::vector<json> livesync_app_infos;

0 commit comments

Comments
 (0)