Merge branch 'tizen_6.5' into tizen 92/268592/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Mon, 27 Dec 2021 09:40:27 +0000 (18:40 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Mon, 27 Dec 2021 09:40:27 +0000 (18:40 +0900)
Change-Id: I3cdca0b8231528f8d8bc29144b81857f753975dc

1  2 
common/vc_defs.h
server/vcd_server.c

Simple merge
@@@ -63,11 -63,6 +63,11 @@@ static int __start_internal_recognition
  /*
  * VC Server Internal Functions
  */
-       return g_current_uid > 0 ? g_current_uid / 1000 : 0;
 +static inline int __get_tts_played_pid()
 +{
++      return g_current_tts_uid > VC_INVALID_TTS_UID ? g_current_tts_uid / 1000 : VC_INVALID_TTS_UID;
 +}
 +
  static Eina_Bool __stop_by_silence(void *data)
  {
        SLOG(LOG_INFO, TAG_VCD, "@@@ Silence Detected ");
@@@ -1146,8 -1136,8 +1146,8 @@@ int vcd_send_feedback_audio_format(int 
  
        /* send TTS feedback audio format to VC manager */
        int ret = VCD_ERROR_NONE;
 -      int pid = g_current_tts_uid / 1000;
 -      if (VC_INVALID_TTS_UID == g_current_tts_uid || vcd_client_manager_get_pid() == pid) {
 +      int pid = __get_tts_played_pid();
-       if (0 == pid || vcd_client_manager_get_pid() == pid) {
++      if (VC_INVALID_TTS_UID == pid || vcd_client_manager_get_pid() == pid) {
                ret = vcdc_send_feedback_audio_format_to_manager(vcd_client_manager_get_pid(), rate, channel, audio_type);
                if (VCD_ERROR_NONE != ret) {
                        SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send TTS feedback audio format to VC manager");
@@@ -1168,10 -1158,10 +1168,10 @@@ int vcd_send_feedback_streaming(vce_fee
        }
  
        int ret = VCD_ERROR_NONE;
 -      int pid = g_current_tts_uid / 1000;
 +      int pid = __get_tts_played_pid();
-       int utt_id = g_current_uid % 1000;
+       int utt_id = g_current_tts_uid % 1000;
  
-       SLOG(LOG_INFO, TAG_VCD, "[Server DEBUG] Engine - Send TTS feedback streaming event(%d), uid(%d), is_mgr_client(%d)", event, g_current_uid, (pid == vcd_client_manager_get_pid() ? true : false));
+       SLOG(LOG_INFO, TAG_VCD, "[Server DEBUG] Engine - Send TTS feedback streaming event(%d), uid(%u), is_mgr_client(%d)", event, g_current_tts_uid, (pid == vcd_client_manager_get_pid() ? true : false));
  
        if (pid == vcd_client_manager_get_pid()) {
                /* send TTS feedback streaming to manager client */