Add error checking of contacts_db_get_records_with_query() 55/44355/1
authorMu-Woong <muwoong.lee@samsung.com>
Tue, 21 Jul 2015 06:10:51 +0000 (15:10 +0900)
committerMu-Woong <muwoong.lee@samsung.com>
Tue, 21 Jul 2015 06:10:51 +0000 (15:10 +0900)
Change-Id: I42c560ef78c7870339e8b14ff06504f7f0d65a1d
Signed-off-by: Mu-Woong <muwoong.lee@samsung.com>
src/social/log_aggregator.cpp

index f0d864c..ce6dcdf 100644 (file)
@@ -101,7 +101,8 @@ void ctx::contact_log_aggregator::get_updated_contact_log_list(int last_time, co
        contacts_query_set_filter(query, filter);
        contacts_query_set_sort(query, _contacts_phone_log.log_time, true);
 
-       contacts_db_get_records_with_query(query, 0, 0, list);
+       err = contacts_db_get_records_with_query(query, 0, 0, list);
+       IF_FAIL_CATCH_TAG(err == CONTACTS_ERROR_NONE, _E, "contacts_db_get_records_with_query() failed");
 
 CATCH:
        if (filter)
@@ -145,8 +146,6 @@ void ctx::contact_log_aggregator::insert_contact_log_list(contacts_list_h list)
                data.set(NULL, STATS_UNIV_TIME, accesstime);
                data.set(NULL, STATS_LOCAL_TIME, accesstime + time_diff);
 
-               /* TODO: Local Time */
-
                db_manager::insert(0, SOCIAL_TABLE_CONTACT_LOG, data, NULL);
 
        } while(contacts_list_next(list) == CONTACTS_ERROR_NONE);