82 |
|
|
83 |
|
|
84 |
static void handle_event(Event_T E); |
static void handle_event(Event_T E); |
|
|
|
85 |
static void handle_stop(Event_T E); |
static void handle_stop(Event_T E); |
86 |
static void handle_start(Event_T E); |
static void handle_start(Event_T E); |
87 |
static void handle_restart(Event_T E); |
static void handle_restart(Event_T E); |
88 |
|
|
89 |
static void swap_message(Event_T E, char *new_message, ...); |
static void swap_message(Event_T E, char *new_message, ...); |
90 |
|
|
91 |
|
|
225 |
case EVENT_RESTART: handle_restart(E); break; |
case EVENT_RESTART: handle_restart(E); break; |
226 |
} |
} |
227 |
|
|
228 |
if(E->id == EVENT_NULL) { |
if(E->id != EVENT_NULL) { |
229 |
/* The event was consumed by an action handler */ |
handle_alert_event(E); |
230 |
return; |
/* TODO: handle_exec_event(E); */ |
231 |
} |
} |
|
|
|
|
handle_alert_event(E); |
|
|
|
|
|
/* TODO: handle_exec_event(E); */ |
|
232 |
|
|
233 |
Event_free(&E); |
Event_free(&E); |
234 |
|
|
240 |
|
|
241 |
static void handle_stop(Event_T E) { |
static void handle_stop(Event_T E) { |
242 |
|
|
|
LOCK(Run.mutex) |
|
|
E->source->do_monitor= FALSE; |
|
|
END_LOCK; |
|
|
|
|
243 |
if(E->source->mode != MODE_PASSIVE) { |
if(E->source->mode != MODE_PASSIVE) { |
244 |
check_service(E->source->name, "stop"); |
check_service(E->source->name, "stop"); |
245 |
|
|
295 |
} |
} |
296 |
|
|
297 |
|
|
298 |
/* ----------------------------------------------------------------- Private */ |
/* ------------------------------------------------------------------------- */ |
299 |
|
|
300 |
|
|
301 |
static void swap_message(Event_T E, char *new_message, ...) { |
static void swap_message(Event_T E, char *new_message, ...) { |