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

Diff of /monit/event.c

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

revision 1.24 by martinp, Wed Aug 27 21:53:13 2003 UTC revision 1.25 by hauk, Tue Sep 2 02:05:49 2003 UTC
# Line 61  struct Event_Table { Line 61  struct Event_Table {
61      {EVENT_START,      "Started"},      {EVENT_START,      "Started"},
62      {EVENT_STOP,       "Stopped"},      {EVENT_STOP,       "Stopped"},
63      {EVENT_RESTART,    "Restarted"},      {EVENT_RESTART,    "Restarted"},
64      {EVENT_CHECKSUM,   "Checksum error"},      {EVENT_CHECKSUM,   "Checksum changed"},
65      {EVENT_RESOURCE,   "Resource limit matched"},      {EVENT_RESOURCE,   "Resource limit matched"},
66      {EVENT_TIMEOUT,    "Timeout"},      {EVENT_TIMEOUT,    "Timeout"},
67      {EVENT_TIMESTAMP,  "Timestamp rule matched"},      {EVENT_TIMESTAMP,  "Timestamp rule matched"},
# Line 314  static void handle_resource(Event_T E) { Line 314  static void handle_resource(Event_T E) {
314        /* Reset the event_flag so the command is not executed again        /* Reset the event_flag so the command is not executed again
315         * unless the flag is explicit set */         * unless the flag is explicit set */
316        r->event_flag= FALSE;        r->event_flag= FALSE;
317        spawn(s, r->exec);        spawn(s, r->exec, EVENT_DESCRIPTION(E));
318      }      }
319    }    }
320    
# Line 332  static void handle_timestamp(Event_T E) Line 332  static void handle_timestamp(Event_T E)
332        /* Reset the event_flag so the command is not executed again        /* Reset the event_flag so the command is not executed again
333         * unless the flag is explicit set */         * unless the flag is explicit set */
334        t->event_flag= FALSE;        t->event_flag= FALSE;
335        spawn(s, t->exec);        spawn(s, t->exec, EVENT_DESCRIPTION(E));
336      }      }
337    }    }
338    
# Line 350  static void handle_size(Event_T E) { Line 350  static void handle_size(Event_T E) {
350        /* Reset the event_flag so the command is not executed again        /* Reset the event_flag so the command is not executed again
351         * unless the flag is explicit set */         * unless the flag is explicit set */
352        sl->event_flag= FALSE;        sl->event_flag= FALSE;
353        spawn(s, sl->exec);        spawn(s, sl->exec, EVENT_DESCRIPTION(E));
354      }      }
355    }    }
356    
# Line 368  static void handle_connection(Event_T E) Line 368  static void handle_connection(Event_T E)
368        /* Reset the event_flag so the command is not executed again        /* Reset the event_flag so the command is not executed again
369         * unless the flag is explicit set */         * unless the flag is explicit set */
370        p->event_flag= FALSE;        p->event_flag= FALSE;
371        spawn(s, p->exec);        spawn(s, p->exec, EVENT_DESCRIPTION(E));
372      }      }
373    }    }
374        
# Line 381  static void handle_checksum(Event_T E) { Line 381  static void handle_checksum(Event_T E) {
381    
382    if(s->checksum->event_flag && s->checksum->exec != NULL) {    if(s->checksum->event_flag && s->checksum->exec != NULL) {
383      s->checksum->event_flag= FALSE;      s->checksum->event_flag= FALSE;
384      spawn(s, s->checksum->exec);      spawn(s, s->checksum->exec, EVENT_DESCRIPTION(E));
385    }    }
386    
387  }  }
# Line 397  static void handle_permission(Event_T E) Line 397  static void handle_permission(Event_T E)
397    
398    if(s->perm->event_flag && s->perm->exec != NULL) {    if(s->perm->event_flag && s->perm->exec != NULL) {
399      s->perm->event_flag= FALSE;      s->perm->event_flag= FALSE;
400      spawn(s, s->perm->exec);      spawn(s, s->perm->exec, EVENT_DESCRIPTION(E));
401    }    }
402    
403  }  }
# Line 413  static void handle_uid(Event_T E) { Line 413  static void handle_uid(Event_T E) {
413    
414    if(s->uid->event_flag && s->uid->exec != NULL) {    if(s->uid->event_flag && s->uid->exec != NULL) {
415      s->uid->event_flag= FALSE;      s->uid->event_flag= FALSE;
416      spawn(s, s->uid->exec);      spawn(s, s->uid->exec, EVENT_DESCRIPTION(E));
417    }    }
418    
419  }  }
# Line 429  static void handle_gid(Event_T E) { Line 429  static void handle_gid(Event_T E) {
429    
430    if(s->gid->event_flag && s->gid->exec != NULL) {    if(s->gid->event_flag && s->gid->exec != NULL) {
431      s->gid->event_flag= FALSE;      s->gid->event_flag= FALSE;
432      spawn(s, s->gid->exec);      spawn(s, s->gid->exec, EVENT_DESCRIPTION(E));
433    }    }
434    
435  }  }

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

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