From: Suyeon Hwang Date: Mon, 17 Apr 2023 11:26:10 +0000 (+0900) Subject: Fix wrong condition for parameter checker X-Git-Tag: accepted/tizen/unified/20230419.044940~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=984da7177b85ac79d198c08fbdc33db9bc7b29cd;p=platform%2Fcore%2Fuifw%2Ftts.git 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 --- diff --git a/client/tts.c b/client/tts.c index 46de738a..191d2d46 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);