check return error when updating simple contact 71/10071/1
authorDonghee Ye <donghee.ye@samsung.com>
Tue, 17 Sep 2013 08:22:04 +0000 (17:22 +0900)
committerDonghee Ye <donghee.ye@samsung.com>
Tue, 17 Sep 2013 08:22:04 +0000 (17:22 +0900)
Change-Id: I0ad6c0ca463f755fdbc6e0383f67a99334d3389c

native/ctsvc_db_plugin_simple_contact.c

index 6f59813..4c1fa04 100644 (file)
@@ -273,10 +273,14 @@ static int __ctsvc_db_simple_contact_update_record( contacts_record_h record )
                g_slist_free(bind_text);
        }
 
+       if (ret < CONTACTS_ERROR_NONE) {
+               ctsvc_end_trans(false);
+               return ret;
+       }
+
        ctsvc_set_contact_noti();
        //ctsvc_update_person(contact);
        ret = ctsvc_end_trans(true);
-       RETVM_IF(ret < CONTACTS_ERROR_NONE, ret, "ctsvc_end_trans() Failed(%d)", ret);
 
        return CONTACTS_ERROR_NONE;
 }