Handle already_initialize error properly not ignored 06/264506/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 23 Sep 2021 11:47:12 +0000 (20:47 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Thu, 23 Sep 2021 11:47:12 +0000 (20:47 +0900)
Change-Id: Ib42f2750757371c74df1463ac8ba6ed738dc0847
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts_core.c

index e2b07179ff59c12b4b69e069ee6d13a0a99792c6..0afa2c050bc4a12736c7f84922cf4dc4d0b3d66b 100644 (file)
@@ -1016,15 +1016,15 @@ int tts_core_receive_hello(int uid, int ret, int credential_needed)
                tts_core_notify_error_async(client, ret, -1, NULL);
 
                return TTS_ERROR_OPERATION_FAILED;
-       } else if (TTS_ERROR_NONE != ret) {
-               SLOG(LOG_WARN, TAG_TTSC, "[WARNING] Fail to connection. Retry to connect : %s", tts_core_covert_error_code(ret));
-               return TTS_ERROR_OPERATION_FAILED;
-       } else {
+       } else if (TTS_ERROR_ALREADY_INITIALIZED == ret) {
                /* success to connect tts-daemon */
                if (TTS_CREDENTIAL_NEEDED_ALREADY_INITIALIZED != credential_needed) {
                        client->credential_needed = credential_needed;
                        SLOG(LOG_ERROR, TAG_TTSC, "Supported options : credential(%d)", credential_needed);
                }
+       } else if (TTS_ERROR_NONE != ret) {
+               SLOG(LOG_WARN, TAG_TTSC, "[WARNING] Fail to connection. Retry to connect : %s", tts_core_covert_error_code(ret));
+               return TTS_ERROR_OPERATION_FAILED;
        }
 
        tts_core_notify_state_changed_async(client, TTS_STATE_READY);