sim_contact_s *record = NULL;
ctsvc_sim_info_s *info;
- if (sim_import_cancel) {
- DBG("SIM contacts import is canceled");
- ret = ctsvc_server_socket_return(__ctsvc_server_sim_get_return_data(), CONTACTS_ERROR_NONE, 0, NULL);
- WARN_IF(CONTACTS_ERROR_NONE != ret, "ctsvc_server_socket_return() Fail(%d)", ret);
- __ctsvc_server_sim_set_return_data(NULL);
- sim_import_cancel = false;
- return;
- }
-
if (NULL == sim_info) {
/* LCOV_EXCL_START */
ERR("sim_info is NULL, result = %d", access_rt);
/* LCOV_EXCL_STOP */
}
+ if (sim_import_cancel) {
+ DBG("SIM contacts import is canceled");
+ ret = ctsvc_server_socket_return(__ctsvc_server_sim_get_return_data(), CONTACTS_ERROR_NONE, 0, NULL);
+ WARN_IF(CONTACTS_ERROR_NONE != ret, "ctsvc_server_socket_return() Fail(%d)", ret);
+ __ctsvc_server_sim_init_import_info(info);
+ __ctsvc_server_sim_set_return_data(NULL);
+ sim_import_cancel = false;
+ return;
+ }
+
if (TAPI_SIM_PB_INVALID_INDEX == access_rt) {
int start_index = 0;
if (user_data)
/* LCOV_EXCL_STOP */
}
} else {
- if (info->file_record[TAPI_PB_3G_NAME].used_count == info->imported_cnt)
+ if (info->file_record[TAPI_PB_3G_NAME].used_count == info->imported_cnt) {
ret = ctsvc_server_socket_return(__ctsvc_server_sim_get_return_data(), CONTACTS_ERROR_NONE, 0, NULL);
- else
+ } else {
+ ERR("ctsvc_server_sim_import_contact() Fail(expectd %d but got %d)", info->file_record[TAPI_PB_3G_NAME].used_count, info->imported_cnt);
ret = ctsvc_server_socket_return(__ctsvc_server_sim_get_return_data(), CONTACTS_ERROR_SYSTEM, 0, NULL);
+ }
WARN_IF(CONTACTS_ERROR_NONE != ret, "ctsvc_server_socket_return() Fail(%d)", ret);
__ctsvc_server_sim_init_import_info(info);
__ctsvc_server_sim_set_return_data(NULL);