account_s *data = (account_s *)malloc(sizeof(account_s));
if (data == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->user_name);
data->user_name = _account_get_text(user_name);
if (data->user_name == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->display_name);
data->display_name = _account_get_text(display_name);
if (data->display_name == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->email_address);
data->email_address = _account_get_text(email_address);
if (data->email_address == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->icon_path);
data->icon_path = _account_get_text(icon_path);
if (data->icon_path == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->source);
data->source = _account_get_text(source);
if (data->source == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->package_name);
data->package_name = _account_get_text(package_name);
if (data->package_name == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->domain_name);
data->domain_name = _account_get_text(domain_name);
if (data->domain_name == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->access_token);
data->access_token = _account_get_text(access_token);
if (data->access_token == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->user_data_txt[idx]);
data->user_data_txt[idx] = _account_get_text(user_txt);
if (data->user_data_txt[idx] == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
char *new_value = NULL;
new_value = _account_get_text(value);
if (new_value == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
}
if (b_is_new) {
- int error_code = ACCOUNT_ERROR_NONE;
-
account_custom_s* custom_data = (account_custom_s *)malloc(sizeof(account_custom_s));
if (custom_data == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
ACCOUNT_MEMSET(custom_data, 0, sizeof(account_custom_s));
custom_data->account_id = data->id;
- /* custom's app_id field will be automatically filled by account-svc daemon. */
-/* custom_data->app_id = _account_get_text(data->package_name);
- if (data->package_name != NULL && custom_data->app_id == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
- error_code = ACCOUNT_ERROR_OUT_OF_MEMORY;
- }
-*/
custom_data->key = _account_get_text(key);
if (custom_data->key == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
- error_code = ACCOUNT_ERROR_OUT_OF_MEMORY;
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
+ _ACCOUNT_FREE(custom_data);
+ return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
custom_data->value = _account_get_text(value);
if (custom_data->value == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
- error_code = ACCOUNT_ERROR_OUT_OF_MEMORY;
- }
-
- if (error_code != ACCOUNT_ERROR_NONE) {
- _ACCOUNT_FREE(custom_data->app_id);
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
_ACCOUNT_FREE(custom_data->key);
- _ACCOUNT_FREE(custom_data->value);
_ACCOUNT_FREE(custom_data);
- return error_code;
+ return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
data->custom_list = g_slist_append(data->custom_list, (gpointer)custom_data);
if (b_is_new) {
account_capability_s *cap_data = (account_capability_s *)malloc(sizeof(account_capability_s));
if (cap_data == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
cap_data->type = _account_get_text(capability_type);
if (cap_data->type == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
_ACCOUNT_FREE(cap_data->type);
_ACCOUNT_FREE(cap_data);
return ACCOUNT_ERROR_OUT_OF_MEMORY;
(*user_name) = NULL;
*user_name = _account_get_text(data->user_name);
if (data->user_name != NULL && *user_name == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*display_name = _account_get_text(data->display_name);
if (data->display_name != NULL && *display_name == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*email_address = _account_get_text(data->email_address);
if (data->email_address != NULL && *email_address == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*icon_path = _account_get_text(data->icon_path);
if (data->icon_path != NULL && *icon_path == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*source = _account_get_text(data->source);
if (data->source != NULL && *source == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*package_name = _account_get_text(data->package_name);
if (data->package_name != NULL && *package_name == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*domain_name = _account_get_text(data->domain_name);
if (data->domain_name != NULL && *domain_name == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*access_token = _account_get_text(data->access_token);
if (data->access_token != NULL && *access_token == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*text = _account_get_text(data->user_data_txt[user_text_index]);
if (data->user_data_txt[user_text_index] != NULL && *text == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
(*value) = NULL;
*value = _account_get_text(custom_data->value);
if (custom_data->value != NULL && *value == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
account_type_s *data = (account_type_s *)malloc(sizeof(account_type_s));
if (data == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->app_id);
data->app_id = _account_get_text(app_id);
if (data->app_id == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->service_provider_id);
data->service_provider_id = _account_get_text(service_provider_id);
if (data->service_provider_id == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->icon_path);
data->icon_path = _account_get_text(icon_path);
if (data->icon_path == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
_ACCOUNT_FREE(data->small_icon_path);
data->small_icon_path = _account_get_text(small_icon_path);
if (data->small_icon_path == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
account_type_s *data = (account_type_s *)account_type;
label_s *label_data = (label_s *)malloc(sizeof(label_s));
if (label_data == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
label_data->label = _account_get_text(label);
if (label_data->label == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
_ACCOUNT_FREE(label_data);
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
label_data->locale = _account_get_text(locale);
if (label_data->locale == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
_ACCOUNT_FREE(label_data->label);
_ACCOUNT_FREE(label_data);
return ACCOUNT_ERROR_OUT_OF_MEMORY;
if (b_is_new) {
provider_feature_s* feature_data = (provider_feature_s *)malloc(sizeof(provider_feature_s));
if (feature_data == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
feature_data->key = _account_get_text(provider_feature);
if (feature_data->key == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
_ACCOUNT_FREE(feature_data);
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
(*app_id) = NULL;
*app_id = _account_get_text(data->app_id);
if (*app_id == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
(*service_provider_id) = NULL;
*service_provider_id = _account_get_text(data->service_provider_id);
if (*service_provider_id == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
(*icon_path) = NULL;
*icon_path = _account_get_text(data->icon_path);
if (*icon_path == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
(*small_icon_path) = NULL;
*small_icon_path = _account_get_text(data->small_icon_path);
if (*small_icon_path == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
if (!strcmp(locale, label_data->locale)) {
*label = _account_get_text(label_data->label);
if (*label == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
if ((char *)(tokens[1]) != NULL) {
char *upper_token = g_ascii_strup(tokens[1], strlen(tokens[1]));
if (upper_token == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
g_strfreev(tokens);
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
if (upper_token != NULL) {
char *converted_locale = g_strdup_printf("%s_%s", tokens[0], upper_token);
if (converted_locale == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
_ACCOUNT_FREE(upper_token);
g_strfreev(tokens);
return ACCOUNT_ERROR_OUT_OF_MEMORY;
g_strfreev(tokens);
*label = _account_get_text(label_data->label);
if (*label == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
*label = NULL;
*label = _account_get_text(label_temp);
if (*label == NULL) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
msg = strdup(vconf_key);
if (msg == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
return;
}
account_subscribe_s *data = (account_subscribe_s *)calloc(1, sizeof(account_subscribe_s));
if (!data) {
- ACCOUNT_FATAL("OUT OF MEMORY\n");
+ ACCOUNT_ERROR("OUT OF MEMORY\n");
return ACCOUNT_ERROR_OUT_OF_MEMORY;
}
}
msg = strdup(vconf_key);
if (msg == NULL) {
- ACCOUNT_FATAL("Memory Allocation Failed");
+ ACCOUNT_ERROR("Memory Allocation Failed");
return;
}