#include "vc_mgr_tidl.h"
#include "vc_mgr_data.h"
#include "vc_mgr_player.h"
-#include "voice_control.h"
#include "voice_control_command.h"
#include "voice_control_command_expand.h"
#include "voice_control_common.h"
}
if (0 == ret || mgr_pid > 0) {
- SLOG(LOG_INFO, TAG_VCD, "@@@ Clean up %s client ", type ? (type == 1) ? "Widget" : "Manager" : "Normal");
+ SLOG(LOG_INFO, TAG_VCD, "@@@ Clean up %s client ", type ? (type == VCD_CLIENT_TYPE_WIDGET) ? "Widget" : "Manager" : "Normal");
if (NULL != client_list && client_count > 0) {
for (i = 0; i < client_count; i++) {
exist = false;
iter = g_list_nth(g_proc_list, j);
if (NULL != iter) {
if (*(client_list + i) == GPOINTER_TO_INT(iter->data)) {
- SLOG(LOG_INFO, TAG_VCD, "%s pid(%d) is running", type ? (type == 1) ? "Widget" : "Manager" : "Normal", *(client_list + i));
+ SLOG(LOG_INFO, TAG_VCD, "%s pid(%d) is running", type ? (type == VCD_CLIENT_TYPE_WIDGET) ? "Widget" : "Manager" : "Normal", *(client_list + i));
exist = true;
break;
}
}
if (false == exist) {
- SLOG(LOG_ERROR, TAG_VCD, "%s pid(%d) should be removed", type ? (type == 1) ? "Widget" : "Manager" : "Normal", *(client_list + i));
+ SLOG(LOG_ERROR, TAG_VCD, "%s pid(%d) should be removed", type ? (type == VCD_CLIENT_TYPE_WIDGET) ? "Widget" : "Manager" : "Normal", *(client_list + i));
if (VCD_CLIENT_TYPE_NORMAL == type)
vcd_server_finalize(*(client_list + i));
else if (VCD_CLIENT_TYPE_WIDGET == type)
}
}
}
+
+ free(client_list);
pthread_mutex_unlock(&g_client_tidl_info_mutex);
} /* signal to clients */
else if (VCD_CLIENT_TYPE_WIDGET == type) {
ret = vcd_client_get_tidl_list(&client_list, &client_count);
if (0 != ret || 0 == client_count) {
SLOG(LOG_WARN, TAG_VCD, "[WARNING] There is no client");
+ if (NULL != client_list)
+ free(client_list);
return VCD_ERROR_NONE;
}
bundle_free(msg);
}
+ free(client_list);
+
return VCD_ERROR_NONE;
}