Prevent destroying rpc handle on rejected callback 68/265768/2
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 28 Oct 2021 07:30:52 +0000 (16:30 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Thu, 28 Oct 2021 08:27:57 +0000 (17:27 +0900)
Change-Id: Ib9027b06aa96f3b5a37748dfdbeb9904d9a4f6f0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts_tidl.c

index 8bf0f06..8a0445d 100644 (file)
@@ -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;
 }