#include "voice_control_command_expand.h"
#include "voice_control_common.h"
+#define CLIENT_CLEAN_UP_TIME 500
/*
* VC Server static variable
*/
static Ecore_Timer *g_restart_timer = NULL;
static Ecore_Timer *g_check_widget_client_timer = NULL;
+static Ecore_Timer *g_check_client_timer = NULL;
/**
* @brief Enumerations of send event type.
vcd_config_set_service_state(VCD_STATE_READY);
vcdc_send_service_state(VCD_STATE_READY);
+ /* Set timer cleanup client all */
+ g_check_client_timer = ecore_timer_add(CLIENT_CLEAN_UP_TIME, vcd_cleanup_client_all, NULL);
+ if (NULL == g_check_client_timer) {
+ SLOG(LOG_WARN, TAG_VCD, "[Server Warning] Fail to create timer of client check");
+ }
+
SLOG(LOG_ERROR, TAG_VCD, "[Server SUCCESS] initialize");
return 0;
}
}
- if (g_restart_timer != NULL) {
+ if (NULL != g_restart_timer) {
ecore_timer_del(g_restart_timer);
g_restart_timer = NULL;
}
+ if (NULL != g_check_client_timer) {
+ ecore_timer_del(g_check_client_timer);
+ g_check_client_timer = NULL;
+ }
+
vcd_state_e state = vcd_config_get_service_state();
if (VCD_STATE_READY != state) {
if (VCD_STATE_RECORDING == state) {