int ret = cynara_initialize(&p_cynara, NULL);
if (CYNARA_API_SUCCESS != ret)
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to initialize");
-
+
return ret == CYNARA_API_SUCCESS;
}
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Permission is denied");
return STT_ERROR_PERMISSION_DENIED;
} else if (-1 == g_privilege_allowed) {
- if (false == __check_privilege_initialize()){
+ if (false == __check_privilege_initialize()) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] privilege initialize is failed");
return STT_ERROR_PERMISSION_DENIED;
}
}
g_privilege_allowed = 1;
- return STT_ERROR_NONE;
+ return STT_ERROR_NONE;
}
static const char* __stt_get_error_code(stt_error_e err)
case STT_ERROR_ENGINE_NOT_FOUND: return "STT_ERROR_ENGINE_NOT_FOUND";
case STT_ERROR_OPERATION_FAILED: return "STT_ERROR_OPERATION_FAILED";
case STT_ERROR_NOT_SUPPORTED_FEATURE: return "STT_ERROR_NOT_SUPPORTED_FEATURE";
+ case STT_ERROR_SERVICE_RESET: return "STT_ERROR_SERVICE_RESET";
default:
return "Invalid error code";
}
free(client->current_engine_id);
}
+ SLOG(LOG_DEBUG, TAG_STTC, "===== engined_id(%s)", engine_id);
+
client->current_engine_id = strdup(engine_id);
SLOG(LOG_DEBUG, TAG_STTC, "=====");
}
}
+ if (0 == strncmp(*data, "NULL", strlen(*data))) {
+ free(*data);
+ *data = NULL;
+ }
+
SLOG(LOG_DEBUG, TAG_STTC, "=====");
SLOG(LOG_DEBUG, TAG_STTC, "");
int count = 0;
silence_supported = false;
credential_needed = false;
+ SLOG(LOG_DEBUG, TAG_STTC, "[WARNING] current_engine_id(%s)", client->current_engine_id);
+
while (0 != ret) {
ret = stt_dbus_request_set_current_engine(client->uid, client->current_engine_id, &silence_supported, &credential_needed);
if (0 != ret) {
SLOG(LOG_WARN, TAG_STTC, "[WARNING] Error callback is null");
}
+ if (STT_ERROR_SERVICE_RESET == reason) {
+ SLOG(LOG_WARN, TAG_STTC, "[WARNING] Service reset");
+
+ client->current_state = STT_STATE_CREATED;
+ if (0 != stt_prepare(client->stt)) {
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Fail to prepare");
+ }
+ }
+
return 0;
}