summaryrefslogtreecommitdiff
path: root/native/ctsvc_utils.c
diff options
context:
space:
mode:
authorDonghee Ye <donghee.ye@samsung.com>2013-07-03 20:32:59 +0900
committerDonghee Ye <donghee.ye@samsung.com>2013-07-03 20:32:59 +0900
commit35603b8ac2e4b5985466781560ad90db5ebac2d5 (patch)
treedfd823c1ae2ea77f3778201c65af2c4572b0fe75 /native/ctsvc_utils.c
parent212bd3fb026f5828c4f4ba957237579441262287 (diff)
downloadcontacts-service-35603b8ac2e4b5985466781560ad90db5ebac2d5.tar.gz
contacts-service-35603b8ac2e4b5985466781560ad90db5ebac2d5.tar.bz2
contacts-service-35603b8ac2e4b5985466781560ad90db5ebac2d5.zip
Update version 0.9.111.1
- Add dlog message - Fix : save image which has uppercase extension - Remove duplicated notifictaion Change-Id: I06e84c91333f3be26e39897b58b738fb38080675
Diffstat (limited to 'native/ctsvc_utils.c')
-rw-r--r--native/ctsvc_utils.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/native/ctsvc_utils.c b/native/ctsvc_utils.c
index 58486aa..c50e0dc 100644
--- a/native/ctsvc_utils.c
+++ b/native/ctsvc_utils.c
@@ -133,6 +133,7 @@ int ctsvc_end_trans(bool is_success)
WARN_IF(CONTACTS_ERROR_NONE != ret, "ctsvc_query_exec(version up) Failed(%d)", ret);
}
+ INFO("start commit");
progress = 100000;
ret = ctsvc_query_exec("COMMIT TRANSACTION");
while (CONTACTS_ERROR_DB == ret && progress<CTS_COMMIT_TRY_MAX) {
@@ -140,6 +141,9 @@ int ctsvc_end_trans(bool is_success)
ret = ctsvc_query_exec("COMMIT TRANSACTION");
progress *= 2;
}
+
+ INFO("%s", (CONTACTS_ERROR_NONE == ret)?"commit": "rollback");
+
if (CONTACTS_ERROR_NONE != ret) {
int tmp_ret;
CTS_ERR("ctsvc_query_exec() Failed(%d)", ret);
@@ -207,21 +211,24 @@ void ctsvc_utils_make_image_file_name(int parent_id, int id, char *src_img, char
{
char *ext;
char *temp;
+ char *lower_ext;
ext = strrchr(src_img, '.');
if (NULL == ext || strchr(ext, '/'))
ext = "";
- temp = ext;
+ lower_ext = strdup(ext);
+ temp = lower_ext;
while (*temp) {
*temp = tolower(*temp);
temp++;
}
if (parent_id > 0)
- snprintf(dest, dest_size, "%d_%d%s", parent_id, id, ext);
+ snprintf(dest, dest_size, "%d_%d%s", parent_id, id, lower_ext);
else
snprintf(dest, dest_size, "%d%s", id, ext);
+ free(lower_ext);
}
static inline bool ctsvc_check_available_image_space(void){