if (0 != ttsd_data_clear_data(uid))
SLOG(LOG_WARN, tts_tag(), "[Server] Fail to ttsd_data_clear_data()");
- if (0 != ttsdc_send_error_message(tmp_pid, uid, uttid, error, (char*)msg))
- SLOG(LOG_WARN, tts_tag(), "[Server] Fail to ttsdc_send_error_message()");
+ if (tmp_pid > 0) {
+ if (0 != ttsdc_send_error_message(tmp_pid, uid, uttid, error, (char*)msg))
+ SLOG(LOG_WARN, tts_tag(), "[Server] Fail to ttsdc_send_error_message()");
+ }
if (0 != ttsd_data_set_client_state(uid, APP_STATE_READY))
SLOG(LOG_WARN, tts_tag(), "[Server] Fail to ttsd_data_set_client_state()");
- if (0 != ttsdc_send_set_state_message(tmp_pid, uid, APP_STATE_READY))
- SLOG(LOG_WARN, tts_tag(), "[Server] Fail to ttsdc_send_set_state_message()");
-
+ if (tmp_pid > 0) {
+ if (0 != ttsdc_send_set_state_message(tmp_pid, uid, APP_STATE_READY))
+ SLOG(LOG_WARN, tts_tag(), "[Server] Fail to ttsdc_send_set_state_message()");
+ }
return 0;
}