_INFO("3. Before account_manager_call_account_add_sync");
bool is_success = account_manager_call_account_add_sync(acc_mgr, account_serialized, (int)getuid(), &db_id, NULL, &error);
+ g_variant_unref(account_serialized);
+
ACCOUNT_CATCH_ERROR((is_success != false), {}, _account_get_error_code(is_success, error), "Failed to get dbus.");
g_clear_error(&error);
_INFO("3. Before account_manager_call_account_update_to_db_by_id_sync");
GVariant *account_serialized = marshal_account((account_s *)account);
is_success = account_manager_call_account_update_to_db_by_id_sync(acc_mgr, account_serialized, account_id, (int)getuid(), NULL, &error);
+ g_variant_unref(account_serialized);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
_INFO("before call update() : account_id[%d]", account_id);
is_success = account_manager_call_account_update_to_db_by_id_ex_sync(acc_mgr, account_serialized, account_id, (int)getuid(), NULL, &error);
+ g_variant_unref(account_serialized);
_INFO("after call update() : is_success=%d", is_success);
if (!is_success) {
GVariant *account_serialized = marshal_account(account_data);
is_success = account_manager_call_account_update_to_db_by_user_name_sync(acc_mgr, account_serialized, user_name, package_name, (int)getuid(), NULL, &error);
+ g_variant_unref(account_serialized);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
_INFO("before unmarshal_account");
account_s *account_data = umarshal_account(account_variant);
+ g_variant_unref(account_variant);
_INFO("after unmarshal_account");
if (account_data == NULL) {
return error_code;
GSList *capability_list = unmarshal_capability_list(capability_list_variant);
+ g_variant_unref(capability_list_variant);
if (capability_list == NULL)
return ACCOUNT_ERROR_NO_DATA;
int db_id = -1;
GVariant *account_type_serialized = marshal_account_type((account_type_s *)account_type);
bool is_success = account_manager_call_account_type_add_sync(acc_mgr, account_type_serialized, (int)getuid(), &db_id, NULL, &error);
+ g_variant_unref(account_type_serialized);
int ret = _account_get_error_code(is_success, error);
g_clear_error(&error);
}
bool is_success = account_manager_call_account_type_update_to_db_by_app_id_sync(acc_mgr, account_type_variant, app_id, (int)getuid(), NULL, &error);
+ g_variant_unref(account_type_variant);
error_code = _account_get_error_code(is_success, error);
g_clear_error(&error);