From: sungwook79.park Date: Mon, 5 Aug 2024 04:52:56 +0000 (+0900) Subject: Add package name to user_data when calling ttse_send_personal_voice X-Git-Tag: accepted/tizen/unified/20240930.043752~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d0951b3039fca4984dd989ba441cfdc23f9bf8d;p=platform%2Fcore%2Fuifw%2Ftts.git Add package name to user_data when calling ttse_send_personal_voice Change-Id: Ifffd2bd905565715fa273ba9de667aad2ef53875 Signed-off-by: sungwook79.park --- diff --git a/server/ttsd_config.c b/server/ttsd_config.c index 7bf7ccb6..a6675ef9 100644 --- a/server/ttsd_config.c +++ b/server/ttsd_config.c @@ -267,8 +267,12 @@ int ttsd_config_set_instant_reprepare_client(const unsigned int uid) int ttsd_config_update_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data) { char current_engine[1024] = {'\0', }; - if (0 != aul_app_get_appid_bypid(getpid(), current_engine, sizeof(current_engine) - 1)) { - SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to get callee appid by pid"); + if (user_data) { + strncpy(current_engine, (char*)user_data, sizeof(current_engine) - 1); + } else { + if (0 != aul_app_get_appid_bypid(getpid(), current_engine, sizeof(current_engine) - 1)) { + SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to get callee appid by pid"); + } } SLOG(LOG_DEBUG, tts_tag(), "[Server] TTS Current Engine(%s)", current_engine); diff --git a/server/ttsd_server.c b/server/ttsd_server.c index 62a15a53..3b56e952 100644 --- a/server/ttsd_server.c +++ b/server/ttsd_server.c @@ -1629,7 +1629,7 @@ int ttsd_send_personal_voice(const char* language, const char* unique_id, const { SLOG(LOG_DEBUG, tts_tag(), "[Server] Set private data requested cb"); - int ret = ttsd_config_update_personal_voice(language, unique_id, display_name, device_name, NULL); + int ret = ttsd_config_update_personal_voice(language, unique_id, display_name, device_name, user_data); if (0 != ret) { SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to update personal voice"); } diff --git a/server/ttse.c b/server/ttse.c index 2472ce4e..a6bc4a23 100755 --- a/server/ttse.c +++ b/server/ttse.c @@ -125,7 +125,7 @@ int ttse_send_personal_voice(const char* language, const char* unique_id, const { SLOG(LOG_INFO, tts_tag(), "[INFO] TTS Engine send personal voices list : language(%s), unique_id(%s), display_name(%s), device_name(%s)", language, unique_id, display_name, device_name); - int ret = ttsd_send_personal_voice(language, unique_id, display_name, device_name, NULL); + int ret = ttsd_send_personal_voice(language, unique_id, display_name, device_name, user_data); if (0 != ret) { SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to send personal voice"); }