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

Diff of /monit/control.c

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

revision 1.87 by martinp, Thu Jan 6 20:51:49 2005 UTC revision 1.88 by martinp, Mon Mar 14 22:30:14 2005 UTC
# Line 74  static int   do_stop(Service_T); Line 74  static int   do_stop(Service_T);
74  static void  do_monitor(Service_T);  static void  do_monitor(Service_T);
75  static void  do_unmonitor(Service_T);  static void  do_unmonitor(Service_T);
76  static void  monitor_set(Service_T);  static void  monitor_set(Service_T);
 static void  monitor_unset(Service_T);  
77  static void *wait_start(void *);  static void *wait_start(void *);
78  static int   wait_stop(Service_T);  static int   wait_stop(Service_T);
79  static void  do_depend(Service_T, const char *);  static void  do_depend(Service_T, const char *);
# Line 161  void control_service(const char *S, cons Line 160  void control_service(const char *S, cons
160            
161      if(s->type==TYPE_PROCESS && !s->stop) {      if(s->type==TYPE_PROCESS && !s->stop) {
162        DEBUG("%s: Stop method not defined -- process %s\n", prog, S);        DEBUG("%s: Stop method not defined -- process %s\n", prog, S);
163        monitor_unset(s);        Util_monitorUnset(s);
164        return;        return;
165      }      }
166            
# Line 292  static int do_stop(Service_T s) { Line 291  static int do_stop(Service_T s) {
291    
292    s->depend_visited= TRUE;    s->depend_visited= TRUE;
293    
294    monitor_unset(s);    Util_monitorUnset(s);
295    
296    if(s->type==TYPE_PROCESS) {    if(s->type==TYPE_PROCESS) {
297      /* Reset the info object in case of a later restart */      /* Reset the info object in case of a later restart */
# Line 360  static void do_unmonitor(Service_T s) { Line 359  static void do_unmonitor(Service_T s) {
359    
360    s->depend_visited= TRUE;    s->depend_visited= TRUE;
361        
362    monitor_unset(s);    Util_monitorUnset(s);
363        
364    if(s->type==TYPE_PROCESS) {    if(s->type==TYPE_PROCESS) {
365      /* Reset the info object in case of a later restart */      /* Reset the info object in case of a later restart */
# Line 384  static void monitor_set(Service_T s) { Line 383  static void monitor_set(Service_T s) {
383    }    }
384    
385  }  }
   
   
 /*  
  * This will disable service monitoring in the case that it is enabled  
  * @param s A Service_T object  
  */  
 static void monitor_unset(Service_T s) {  
   
   ASSERT(s);  
   
   if(s->monitor) {  
     s->monitor= MONITOR_NOT;  
     DEBUG("Monitoring disabled -- service %s\n", s->name);  
   }  
   
 }  
386    
387    
388  /*  /*

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.88

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