Fix to save time info and to make directories
[platform/core/uifw/stt.git] / server / sttd_server.c
index a3b528e..aaee986 100644 (file)
@@ -297,15 +297,10 @@ bool __server_result_time_callback(int index, stte_result_time_event_e event, co
        SLOG(LOG_DEBUG, TAG_STTD, "[Server] index(%d) event(%d) text(%s) start(%ld) end(%ld)",
                index, event, text, start_time, end_time);
 
-       if (0 == index) {
-               int ret;
-               ret = sttd_config_time_add(index, (int)event, text, start_time, end_time);
-               if (0 != ret) {
-                       SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to add time info");
-                       pthread_mutex_unlock(&stte_result_time_mutex);
-                       return false;
-               }
-       } else {
+       int ret;
+       ret = sttd_config_time_add(index, (int)event, text, start_time, end_time);
+       if (0 != ret) {
+               SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to add time info");
                pthread_mutex_unlock(&stte_result_time_mutex);
                return false;
        }