Add dummy value when null parameter is used 70/265070/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Fri, 8 Oct 2021 06:42:57 +0000 (15:42 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Fri, 8 Oct 2021 06:42:57 +0000 (15:42 +0900)
Change-Id: Id39e6689460acb7c5fb1fffb96524e90d8548924
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts_tidl.c

index 1f47365..c28317e 100644 (file)
@@ -527,7 +527,8 @@ int tts_tidl_request_add_text(int uid, const char* text, const char* lang, int v
                return TTS_ERROR_OPERATION_FAILED;
        }
 
-       if (0 != rpc_port_proxy_tts_invoke_add_text(info->rpc_h, uid, text, lang, vctype, speed, uttid, credential)) {
+       const char *not_null_credential = NULL == credential ? "NULL" : credential;
+       if (0 != rpc_port_proxy_tts_invoke_add_text(info->rpc_h, uid, text, lang, vctype, speed, uttid, not_null_credential)) {
                SLOG(LOG_ERROR, TAG_TTSC, ">>>> Request add text : Fail to invoke message");
                return TTS_ERROR_OPERATION_FAILED;
        }
@@ -630,7 +631,8 @@ int tts_tidl_request_play(int uid, const char* credential)
                return TTS_ERROR_OPERATION_FAILED;
        }
 
-       if (0 != rpc_port_proxy_tts_invoke_play(info->rpc_h, uid, credential)) {
+       const char *not_null_credential = NULL == credential ? "NULL" : credential;
+       if (0 != rpc_port_proxy_tts_invoke_play(info->rpc_h, uid, not_null_credential)) {
                SLOG(LOG_ERROR, TAG_TTSC, ">>>> Request play : Fail to invoke message");
                return TTS_ERROR_OPERATION_FAILED;
        }