From 984da7177b85ac79d198c08fbdc33db9bc7b29cd Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Mon, 17 Apr 2023 20:26:10 +0900 Subject: [PATCH] Fix wrong condition for parameter checker - Issue: tts_set_playing_mode() always returns invalid parameter error. - Solution: This patch fixes the condition for parameter checker in tts_set_playing_mode(). Previous condition statement always returns true, so the function works wrong. Through this patch, the function will properly check the paramter. Change-Id: I2fdb5254f942f6e9c1c1741e241bcfc32fe4cbdf Signed-off-by: Suyeon Hwang --- client/tts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/tts.c b/client/tts.c index 46de738..191d2d4 100644 --- a/client/tts.c +++ b/client/tts.c @@ -436,7 +436,7 @@ int tts_set_playing_mode(tts_h tts, tts_playing_mode_e mode) SLOG(LOG_INFO, TAG_TTSC, "@@@ Set TTS playing mode(%d)", mode); - RETVM_IF(TTS_PLAYING_MODE_BY_CLIENT > mode || TTS_PLAYING_MODE_BY_SERVICE < mode, TTS_ERROR_INVALID_PARAMETER, "[ERROR] mode is not valid : %d", mode); + RETVM_IF(TTS_PLAYING_MODE_BY_SERVICE > mode || TTS_PLAYING_MODE_BY_CLIENT < mode, TTS_ERROR_INVALID_PARAMETER, "[ERROR] mode is not valid : %d", mode); tts_client_s* client = tts_client_get(tts); RETVM_IF(NULL == client, TTS_ERROR_INVALID_PARAMETER, "[ERROR] A handle is not valid. tts(%p)", tts); -- 2.7.4