Add a checker into __send_interrupt_client 29/222729/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Thu, 16 Jan 2020 05:10:55 +0000 (14:10 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Fri, 17 Jan 2020 09:20:16 +0000 (09:20 +0000)
Change-Id: I94ee9dcf11557f40571a27744a7efc4c19d481a7
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
(cherry picked from commit 95b4f04dd8e62cc18cda2408d15c73e8d9abc427)

server/ttsd_server.c

index bb2e53d..8ba5724 100644 (file)
@@ -869,6 +869,11 @@ Eina_Bool __send_interrupt_client(void *data)
 
        int pid = ttsd_data_get_pid(uid);
 
+       if (pid <= 0) {
+               SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to get pid. uid(%d), pid(%d)", uid, pid);
+               return EINA_FALSE;
+       }
+
        if (TTSD_MODE_DEFAULT != ttsd_get_mode()) {
                /* send message to client about changing state */
                ttsdc_send_set_state_message(pid, uid, APP_STATE_READY);