res = app_control_get_extra_data(app_control, "request", &request);
if (APP_CONTROL_ERROR_NONE == res && NULL != request) {
if (strcmp(request, "sync") == 0) {
- LOGI("[sync request] mode : %s, category : %s, type : %s", mode, category, type);
+ bool param_error = false;
if (app_control_get_extra_data(app_control, "mode", &mode) != APP_CONTROL_ERROR_NONE) {
LOGE("No given mode");
- goto cleanup;
+ param_error = true;
}
if (app_control_get_extra_data(app_control, "category", &category) != APP_CONTROL_ERROR_NONE) {
LOGE("No given category");
- goto cleanup;
+ param_error = true;
}
if (app_control_get_extra_data(app_control, "type", &type) != APP_CONTROL_ERROR_NONE) {
LOGE("No given type");
- goto cleanup;
+ param_error = true;
}
+ LOGI("[sync request] mode : %s, category : %s, type : %s", mode, category, type);
+ if (param_error)
+ goto cleanup;
+
if (mode && category && type)
request_sticker_data(mode, category, type);
}