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

Diff of /monit/validate.c

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

revision 1.83 by hauk, Sun Aug 31 20:05:51 2003 UTC revision 1.84 by hauk, Wed Sep 3 23:28:38 2003 UTC
# Line 327  static int check_directory(Service_T s) Line 327  static int check_directory(Service_T s)
327    }    }
328    
329    if(!S_ISDIR(stat_buf.st_mode)) {    if(!S_ISDIR(stat_buf.st_mode)) {
330      Event_post(s, EVENT_STOP,      Event_post(s, EVENT_UNMONITOR,
331                 "Event: '%s' is not directory\n", s->name);                 "Event: '%s' is not directory\n", s->name);
332      return FALSE;      return FALSE;
333    }    }
# Line 372  static int check_file(Service_T s) { Line 372  static int check_file(Service_T s) {
372    }    }
373        
374    if(!S_ISREG(stat_buf.st_mode)) {    if(!S_ISREG(stat_buf.st_mode)) {
375      Event_post(s, EVENT_STOP, "Event: '%s' is not regular file\n", s->name);      Event_post(s, EVENT_UNMONITOR,
376                   "Event: '%s' is not regular file\n", s->name);
377      return FALSE;      return FALSE;
378    }    }
379        
# Line 455  static int check_device(Service_T s) { Line 456  static int check_device(Service_T s) {
456    /* Test devices */    /* Test devices */
457    if(s->devicelist) {    if(s->devicelist) {
458      if(!DeviceInfo_Usage(s->devinfo, s->path)) {      if(!DeviceInfo_Usage(s->devinfo, s->path)) {
459        Event_post(s, EVENT_STOP, "Event: unable to read device state\n");        Event_post(s, EVENT_UNMONITOR, "Event: unable to read device state\n");
460        return FALSE;        return FALSE;
461      }      }
462      for(td= s->devicelist; td; td= td->next) {      for(td= s->devicelist; td; td= td->next) {

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84

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