Fix state check code 06/254306/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Fri, 26 Feb 2021 04:39:33 +0000 (13:39 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Fri, 26 Feb 2021 04:39:33 +0000 (13:39 +0900)
Current state check code just checks current state is ready or not.
However, if state is not ready, client is still connected to server,
because playing or processing state also means the connection is still
on.
This patch changes the state check code to exact way.

Change-Id: Idb3be9f1b042c01dbd7c2e5f208866d70d8a25a0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts_core.c

index 575e4b7fb7bfa3d520e4229e0ecb8b0ba3bbbc2f..7dcac7fbb07e5ebfab70536924b48383439a2d92 100644 (file)
@@ -834,8 +834,8 @@ int tts_core_receive_hello(int uid, int ret, int credential_needed)
                return TTS_ERROR_OPERATION_FAILED;
        }
 
-       if (TTS_STATE_READY == client->current_state) {
-               SLOG(LOG_INFO, TAG_TTSC, "[INFO] tts client is already READY");
+       if (TTS_STATE_CREATED != client->current_state) {
+               SLOG(LOG_INFO, TAG_TTSC, "[INFO] tts client is already prepared");
                return TTS_ERROR_NONE;
        }