contacts_list_first(list);
}
+ ctsvc_server_stop_timeout();
ret = ctsvc_db_insert_records(list, &ids, &id_count);
if (outdata) {
contacts_list_first(list);
}
+ ctsvc_server_stop_timeout();
ret = ctsvc_db_update_records(list);
if (outdata) {
contacts_list_first(list);
}
+ ctsvc_server_stop_timeout();
ret = ctsvc_db_replace_records(list, ids, count);
if (outdata) {
*
*/
#include <glib.h>
+#include <phone_number.h>
#include "contacts.h"
#include "contacts_internal.h"
contacts_list_first(list);
index = 0;
+ /* for performance. phone_number_get_normalized_number() can be called repeatedly below */
+ phone_number_connect();
do {
ret = contacts_list_get_current_record_p(list, &record);
if (CONTACTS_ERROR_NONE != ret) {
ERR("contacts_list_get_current_record_p() Fail(%d)", ret);
ctsvc_end_trans(false);
free(id);
+ phone_number_disconnect();
return ret;
/* LCOV_EXCL_STOP */
}
ERR("contacts_db_insert_record() Fail(%d)", ret);
ctsvc_end_trans(false);
free(id);
+ phone_number_disconnect();
return ret;
/* LCOV_EXCL_STOP */
}
} while (CONTACTS_ERROR_NONE == contacts_list_next(list));
-
+ phone_number_disconnect();
ret = ctsvc_end_trans(true);
if (ret < CONTACTS_ERROR_NONE) {
/* LCOV_EXCL_START */
RETVM_IF(CONTACTS_ERROR_NONE != ret, ret, "ctsvc_begin_trans() Fail(%d)", ret);
contacts_list_first(list);
+ /* for performance. phone_number_get_normalized_number() can be called repeatedly below */
+ phone_number_connect();
do {
ret = contacts_list_get_current_record_p(list, &record);
if (CONTACTS_ERROR_NONE != ret) {
/* LCOV_EXCL_START */
ERR("contacts_list_get_current_record_p() Fail(%d)", ret);
ctsvc_end_trans(false);
+ phone_number_disconnect();
return ret;
/* LCOV_EXCL_STOP */
}
/* LCOV_EXCL_START */
ERR("contacts_db_update_record() Fail(%d)", ret);
ctsvc_end_trans(false);
+ phone_number_disconnect();
return ret;
/* LCOV_EXCL_STOP */
}
} while (CONTACTS_ERROR_NONE == contacts_list_next(list));
+ phone_number_disconnect();
ret = ctsvc_end_trans(true);
if (ret < CONTACTS_ERROR_NONE) {
/* LCOV_EXCL_START */
contacts_list_first(list);
i = 0;
+ /* for performance. phone_number_get_normalized_number() can be called repeatedly below */
+ phone_number_connect();
do {
ret = contacts_list_get_current_record_p(list, &record);
if (CONTACTS_ERROR_NONE != ret) {
/* LCOV_EXCL_START */
ERR("contacts_list_get_current_record_p() Fail(%d)", ret);
ctsvc_end_trans(false);
+ phone_number_disconnect();
return ret;
/* LCOV_EXCL_STOP */
}
/* LCOV_EXCL_START */
ERR("contacts_db_replace_record() Fail(%d)", ret);
ctsvc_end_trans(false);
+ phone_number_disconnect();
return ret;
/* LCOV_EXCL_STOP */
}
} while (CONTACTS_ERROR_NONE == contacts_list_next(list));
-
+ phone_number_disconnect();
ret = ctsvc_end_trans(true);
return ret;