Add file name checker and Fix dbus type and bt return
[platform/core/uifw/stt.git] / server / sttd_server.c
index 78f64e6..ea462df 100644 (file)
@@ -217,6 +217,9 @@ int __server_recognition_result_callback(stte_result_event_e event, const char*
                sttd_config_time_save();
                sttd_config_time_reset();
 
+               sttd_client_set_state(uid, APP_STATE_READY);
+               stt_client_unset_current_recognition();
+
                if (NULL == data || 0 == data_count) {
                        if (0 != sttdc_send_result(uid, event, NULL, 0, msg)) {
                                SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to send result");
@@ -238,8 +241,8 @@ int __server_recognition_result_callback(stte_result_event_e event, const char*
                }
 
                /* change state of uid */
-               sttd_client_set_state(uid, APP_STATE_READY);
-               stt_client_unset_current_recognition();
+//             sttd_client_set_state(uid, APP_STATE_READY);
+//             stt_client_unset_current_recognition();
 
        } else if (STTE_RESULT_EVENT_PARTIAL_RESULT == event) {
                SLOG(LOG_DEBUG, TAG_STTD, "[Server] The partial result from engine is event[%d] data_count[%d]", event,  data_count);
@@ -266,6 +269,9 @@ int __server_recognition_result_callback(stte_result_event_e event, const char*
                }
                sttd_config_time_reset();
 
+               sttd_client_set_state(uid, APP_STATE_READY);
+               stt_client_unset_current_recognition();
+
                if (0 != sttdc_send_result(uid, event, NULL, 0, msg)) {
                        SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to send result ");
 
@@ -277,8 +283,8 @@ int __server_recognition_result_callback(stte_result_event_e event, const char*
                }
 
                /* change state of uid */
-               sttd_client_set_state(uid, APP_STATE_READY);
-               stt_client_unset_current_recognition();
+//             sttd_client_set_state(uid, APP_STATE_READY);
+//             stt_client_unset_current_recognition();
        } else {
                /* nothing */
        }