summaryrefslogtreecommitdiff
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
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
-rwxr-xr-xCMakeLists.txt2
-rw-r--r--common/ctsvc_filter.c4
-rw-r--r--common/ctsvc_query.c4
-rw-r--r--contacts-service2.manifest2
-rw-r--r--native/ctsvc_db_plugin_contact_helper.c7
-rw-r--r--native/ctsvc_notification.c1
-rwxr-xr-xnative/ctsvc_sqlite.c4
-rw-r--r--native/ctsvc_utils.c11
-rw-r--r--packaging/contacts-service.spec2
-rw-r--r--server/ctsvc_server_bg.c1
10 files changed, 25 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52eb615..6d57924 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
SET(INCLUDEDIR "\${prefix}/${DEST_INCLUDE_DIR}")
SET(VERSION_MAJOR 0)
-SET(VERSION "${VERSION_MAJOR}.9.110.1")
+SET(VERSION "${VERSION_MAJOR}.9.111.1")
EXECUTE_PROCESS(COMMAND build-util/generator.sh)
diff --git a/common/ctsvc_filter.c b/common/ctsvc_filter.c
index f7cb367..62f3ab9 100644
--- a/common/ctsvc_filter.c
+++ b/common/ctsvc_filter.c
@@ -159,8 +159,8 @@ API int contacts_filter_add_str( contacts_filter_h filter, unsigned int property
com_filter = (ctsvc_composite_filter_s*)filter;
ret = __ctsvc_attribute_filter_create(com_filter, property_id, match, CTSVC_FILTER_STR, &str_filter);
RETVM_IF(CONTACTS_ERROR_NONE !=ret, ret,
- "Invalid parameter : The parameter is not proper (view_uri:, property_id:0x%x, match:%d)",
- property_id, match);
+ "Invalid parameter : The parameter is not proper (view_uri:%s, property_id:0x%x, match:%d)",
+ com_filter->view_uri, property_id, match);
str_filter->value.s = SAFE_STRDUP(match_value);
return CONTACTS_ERROR_NONE;
diff --git a/common/ctsvc_query.c b/common/ctsvc_query.c
index 400b7d5..2e93282 100644
--- a/common/ctsvc_query.c
+++ b/common/ctsvc_query.c
@@ -97,13 +97,15 @@ API int contacts_query_set_projection(contacts_query_h query, unsigned int prope
API int contacts_query_set_filter(contacts_query_h query, contacts_filter_h filter)
{
+ int ret;
ctsvc_query_s *s_query;
contacts_filter_h new_filter;
RETV_IF(NULL == query || NULL == filter, CONTACTS_ERROR_INVALID_PARAMETER);
s_query = (ctsvc_query_s *)query;
- ctsvc_filter_clone(filter, &new_filter);
+ ret = ctsvc_filter_clone(filter, &new_filter);
+ RETVM_IF(ret != CONTACTS_ERROR_NONE, ret, "ctsvc_filter_clone Fail(%d)", ret);
s_query->filter = (ctsvc_composite_filter_s*)new_filter;
return CONTACTS_ERROR_NONE;
diff --git a/contacts-service2.manifest b/contacts-service2.manifest
index 9596f5e..9a19803 100644
--- a/contacts-service2.manifest
+++ b/contacts-service2.manifest
@@ -18,7 +18,7 @@
</request>
</define>
<assign>
- <filesystem path="/usr/lib/libcontacts-service2.so.0.9.110.1" label="_"/>
+ <filesystem path="/usr/lib/libcontacts-service2.so.0.9.111.1" label="_"/>
<filesystem path="/usr/lib/libcontacts-service2.so.0" label="_"/>
<filesystem path="/opt/usr/dbspace/.contacts-svc.db" label="contacts-service::db"/>
<filesystem path="/opt/usr/dbspace/.contacts-svc.db-journal" label="contacts-service::db"/>
diff --git a/native/ctsvc_db_plugin_contact_helper.c b/native/ctsvc_db_plugin_contact_helper.c
index ee23a0c..bd99e93 100644
--- a/native/ctsvc_db_plugin_contact_helper.c
+++ b/native/ctsvc_db_plugin_contact_helper.c
@@ -66,6 +66,7 @@ int ctsvc_contact_add_image_file(int parent_id, int img_id,
int version;
char *ext;
char *temp;
+ char *lower_ext;
RETVM_IF(NULL == src_img, CONTACTS_ERROR_INVALID_PARAMETER, "image_thumbnail_path is NULL");
@@ -73,14 +74,16 @@ int ctsvc_contact_add_image_file(int parent_id, int img_id,
if (NULL == ext || strchr(ext, '/'))
ext = "";
- temp = ext;
+ lower_ext = strdup(ext);
+ temp = lower_ext;
while (*temp) {
*temp = tolower(*temp);
temp++;
}
version = ctsvc_get_next_ver();
- snprintf(dest, dest_size, "%d_%d-%d%s", parent_id, img_id, version, ext);
+ snprintf(dest, dest_size, "%d_%d-%d%s", parent_id, img_id, version, lower_ext);
+ free(lower_ext);
ret = ctsvc_utils_copy_image(CTS_IMG_FULL_LOCATION, src_img, dest);
if (CONTACTS_ERROR_NONE != ret) {
diff --git a/native/ctsvc_notification.c b/native/ctsvc_notification.c
index e14ced0..08c12b9 100644
--- a/native/ctsvc_notification.c
+++ b/native/ctsvc_notification.c
@@ -443,7 +443,6 @@ void ctsvc_notification_send()
if (relationship_change) __ctsvc_noti_publish_relationship_change();
if (image_change) __ctsvc_noti_publish_image_change();
if (profile_change) __ctsvc_noti_publish_profile_change();
- if (company_change) __ctsvc_noti_publish_company_change();
}
void ctsvc_db_data_delete_callback(sqlite3_context * context,
diff --git a/native/ctsvc_sqlite.c b/native/ctsvc_sqlite.c
index 5805acd..92dcf67 100755
--- a/native/ctsvc_sqlite.c
+++ b/native/ctsvc_sqlite.c
@@ -46,11 +46,11 @@ static __thread sqlite3 *ctsvc_db = NULL;
static inline int __ctsvc_db_busyhandler(void *pData, int count)
{
if(10 - count > 0) {
- CTS_DBG("Busy Handler Called! : PID(%d) / CNT(%d)\n", getpid(), count+1);
+ CTS_ERR("Busy Handler Called! : Thread(%08x) / CNT(%d)\n", pthread_self(), count+1);
usleep(20000);
return 1;
} else {
- CTS_DBG("Busy Handler will be returned SQLITE_BUSY error : PID(%d) \n", getpid());
+ CTS_ERR("Busy Handler will be returned SQLITE_BUSY error : Thread(%08x) \n", pthread_self());
return 0;
}
}
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){
diff --git a/packaging/contacts-service.spec b/packaging/contacts-service.spec
index 0ee95c2..6d7766d 100644
--- a/packaging/contacts-service.spec
+++ b/packaging/contacts-service.spec
@@ -1,6 +1,6 @@
Name: contacts-service
Summary: Contacts Service
-Version: 0.9.110.1
+Version: 0.9.111.1
Release: 1
Group: TO_BE/FILLED_IN
License: Apache-2.0
diff --git a/server/ctsvc_server_bg.c b/server/ctsvc_server_bg.c
index 13072a9..a9d8698 100644
--- a/server/ctsvc_server_bg.c
+++ b/server/ctsvc_server_bg.c
@@ -382,6 +382,7 @@ static void __ctsvc_server_contact_deleted_cb(const char *view_uri, void *data)
static bool __ctsvc_server_account_delete_cb(const char* event_type, int account_id, void* user_data)
{
CTS_FN_CALL;
+ CTS_INFO("event_type : %s, account_id : %d", event_type, account_id);
if (strcmp(event_type, ACCOUNT_NOTI_NAME_DELETE) == 0)
ctsvc_addressbook_delete(account_id);
return true;