return TTSD_ERROR_OPERATION_FAILED;
}
- char* appid = NULL;
- if (0 != app_manager_get_app_id(pid, &appid)) {
- SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to get app id, pid(%d)", pid);
- }
- bool is_agreed = false;
- if (0 != ttsd_engine_check_app_agreed(appid, &is_agreed)) {
- SLOG(LOG_ERROR, tts_tag(), "Server ERROR] Fail to check app agreed");
+ if (true == *credential_needed) {
+ char* appid = NULL;
+ if (0 != app_manager_get_app_id(pid, &appid)) {
+ SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to get app id, pid(%d)", pid);
+ }
+ bool is_agreed = false;
+ if (0 != ttsd_engine_check_app_agreed(appid, &is_agreed)) {
+ SLOG(LOG_ERROR, tts_tag(), "Server ERROR] Fail to check app agreed");
+ if (!appid)
+ free(appid);
+ return TTSD_ERROR_OPERATION_FAILED;
+ }
if (!appid)
free(appid);
- return TTSD_ERROR_OPERATION_FAILED;
- }
- if (!appid)
- free(appid);
- if (false == is_agreed) {
- SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] App is not agreed");
- return TTSD_ERROR_PERMISSION_DENIED;
+ if (false == is_agreed) {
+ SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] App is not agreed");
+ return TTSD_ERROR_PERMISSION_DENIED;
+ }
}
if (0 != ttsd_data_new_client(pid, uid)) {