Skip to content

Commit

Permalink
Pre initialize pthread condition variable (#16086)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelazoDS committed Feb 9, 2023
1 parent 916669d commit c0295b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wazuh_modules/wm_syscollector.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ static void wm_sys_stop(wm_sys_t *sys); // Module stopper
const char *WM_SYS_LOCATION = "syscollector"; // Location field for event sending
cJSON *wm_sys_dump(const wm_sys_t *sys);
int wm_sync_message(const char *data);
pthread_cond_t sys_stop_condition;
pthread_mutex_t sys_stop_mutex;
pthread_cond_t sys_stop_condition = PTHREAD_COND_INITIALIZER;
pthread_mutex_t sys_stop_mutex = PTHREAD_MUTEX_INITIALIZER;
bool need_shutdown_wait = false;
pthread_mutex_t sys_reconnect_mutex;
pthread_mutex_t sys_reconnect_mutex = PTHREAD_MUTEX_INITIALIZER;
bool shutdown_process_started = false;

const wm_context WM_SYS_CONTEXT = {
Expand Down

0 comments on commit c0295b7

Please sign in to comment.