/[monit]/monit/event.c
ViewVC logotype

Diff of /monit/event.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by hauk, Wed Jul 2 19:32:02 2003 UTC revision 1.2 by hauk, Wed Jul 2 21:40:44 2003 UTC
# Line 82  struct Event_Table { Line 82  struct Event_Table {
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    
# Line 225  static void handle_event(Event_T E) { Line 225  static void handle_event(Event_T E) {
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    
# Line 244  static void handle_event(Event_T E) { Line 240  static void handle_event(Event_T E) {
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            
# Line 303  static void handle_restart(Event_T E) { Line 295  static void handle_restart(Event_T E) {
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, ...) {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26