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

Diff of /monit/event.c

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

revision 1.13 by hauk, Mon Aug 4 07:52:11 2003 UTC revision 1.14 by martinp, Tue Aug 5 07:55:21 2003 UTC
# Line 66  struct Event_Table { Line 66  struct Event_Table {
66      {EVENT_TIMEOUT,    "Timeout"},      {EVENT_TIMEOUT,    "Timeout"},
67      {EVENT_TIMESTAMP,  "Timestamp rule matched"},      {EVENT_TIMESTAMP,  "Timestamp rule matched"},
68      {EVENT_SIZE,       "Size rule matched"},      {EVENT_SIZE,       "Size rule matched"},
69      {EVENT_CONNECTION, "Connection test failed"}      {EVENT_CONNECTION, "Connection test failed"},
70        {EVENT_PERMISSION, "Permission error"}
71  };  };
72    
73    
# Line 83  static void handle_checksum(Event_T E); Line 84  static void handle_checksum(Event_T E);
84  static void handle_resource(Event_T E);  static void handle_resource(Event_T E);
85  static void handle_timestamp(Event_T E);  static void handle_timestamp(Event_T E);
86  static void handle_connection(Event_T E);  static void handle_connection(Event_T E);
87    static void handle_permission(Event_T E);
88    
89    
90  /* ------------------------------------------------------------------ Public */  /* ------------------------------------------------------------------ Public */
# Line 233  static void handle_event(Event_T E) { Line 235  static void handle_event(Event_T E) {
235    case EVENT_RESOURCE:   handle_resource(E); break;    case EVENT_RESOURCE:   handle_resource(E); break;
236    case EVENT_TIMESTAMP:  handle_timestamp(E); break;    case EVENT_TIMESTAMP:  handle_timestamp(E); break;
237    case EVENT_CONNECTION: handle_connection(E); break;    case EVENT_CONNECTION: handle_connection(E); break;
238      case EVENT_PERMISSION: handle_permission(E); break;
239    }    }
240        
241    if(E->id != EVENT_NULL) {    if(E->id != EVENT_NULL) {
# Line 374  static void handle_connection(Event_T E) Line 377  static void handle_connection(Event_T E)
377  }  }
378    
379    
380    static void handle_permission(Event_T E) {
381    
382      LOCK(Run.mutex)
383          E->source->do_monitor= FALSE;
384          E->source->has_permission_error= TRUE;
385      END_LOCK;
386    
387    }
388    
389    
390  /* ------------------------------------------------------------------------- */  /* ------------------------------------------------------------------------- */
391    
392    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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