From 497a9a123e097f62f06273c436cc1a915f9ee117 Mon Sep 17 00:00:00 2001 From: Gukhwan Cho Date: Wed, 9 Sep 2015 12:06:30 +0900 Subject: [PATCH] update dirty flag checking Change-Id: Ife71b82120da5f80735b3150a5788f67d57ee9f8 Signed-off-by: Gukhwan Cho --- server/db/ctsvc_db_plugin_person.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/db/ctsvc_db_plugin_person.c b/server/db/ctsvc_db_plugin_person.c index e94c338..ee0ce08 100644 --- a/server/db/ctsvc_db_plugin_person.c +++ b/server/db/ctsvc_db_plugin_person.c @@ -188,14 +188,14 @@ static int __ctsvc_db_person_update_record(contacts_record_h record) /* update favorite */ index_favorite = CTSVC_PROPERTY_PERSON_IS_FAVORITE & 0x000000FF; if (person->base.properties_flags && - CTSVC_PROPERTY_FLAG_DIRTY == person->base.properties_flags[index_favorite]) { + ctsvc_record_check_property_flag(person, index_favorite, CTSVC_PROPERTY_FLAG_DIRTY)) { ret = ctsvc_db_person_set_favorite(person->person_id, person->is_favorite, true); if (CONTACTS_ERROR_NONE != ret) { CTS_ERR("ctsvc_db_person_set_favorite() Fail(%d)", ret); ctsvc_end_trans(false); return ret; } - person->base.properties_flags[index_favorite] = 0; + person->base.properties_flags[index_favorite] &= 0xFFFFFFFD; /* remove dirty bit */ ctsvc_set_contact_noti(); } -- 2.7.4