From: Suyeon Hwang Date: Thu, 28 Oct 2021 07:30:52 +0000 (+0900) Subject: Prevent destroying rpc handle on rejected callback X-Git-Tag: submit/tizen/20211028.101609~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F68%2F265768%2F2;p=platform%2Fcore%2Fuifw%2Ftts.git Prevent destroying rpc handle on rejected callback Change-Id: Ib9027b06aa96f3b5a37748dfdbeb9904d9a4f6f0 Signed-off-by: Suyeon Hwang --- diff --git a/client/tts_tidl.c b/client/tts_tidl.c index 8bf0f064..8a0445d0 100644 --- a/client/tts_tidl.c +++ b/client/tts_tidl.c @@ -33,8 +33,6 @@ typedef struct { static GList* g_tidl_infos = NULL; -static rpc_port_proxy_tts_h __create_rpc_port(int uid, const char* engine_app_id); - static tts_tidl_info_s* __get_tidl_info_s(int uid) { GList* iter = NULL; @@ -203,21 +201,9 @@ static void __on_rejected(rpc_port_proxy_tts_h h, void *user_data) SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to get tidl info"); return; } - - if (0 != rpc_port_proxy_tts_destroy(info->rpc_h)) { - SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to disconnect"); - return; - } - - info->rpc_h = __create_rpc_port(uid, info->engine_app_id); - if (NULL == info->rpc_h) { - SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to create proxy"); - return; - } info->connection_requesting = false; - tts_core_notify_error_async(client, TTS_ERROR_PERMISSION_DENIED, client->utt_id, "Rejected"); - SLOG(LOG_DEBUG, TAG_TTSC, "Rejected from server"); + SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Rejected from server(%d)", uid); } static void __get_engine_app_id(int mode, int size, char* app_id) @@ -423,17 +409,6 @@ static int __request_tidl_connect_sync(tts_tidl_info_s* info) { return TTS_ERROR_NONE; } - if (0 != rpc_port_proxy_tts_destroy(info->rpc_h)) { - SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to disconnect"); - return TTS_ERROR_OPERATION_FAILED; - } - - info->rpc_h = __create_rpc_port(info->uid, info->engine_app_id); - if (NULL == info->rpc_h) { - SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to create proxy"); - return TTS_ERROR_OPERATION_FAILED; - } - return TTS_ERROR_OPERATION_FAILED; }