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

Diff of /monit/control.c

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

revision 1.17 by martinp, Mon Dec 16 21:14:06 2002 UTC revision 1.18 by martinp, Mon Dec 16 23:17:52 2002 UTC
# Line 123  void d_check_process(char *P, char *acti Line 123  void d_check_process(char *P, char *acti
123    char *auth= get_basic_authentication_header();    char *auth= get_basic_authentication_header();
124    ssl_connection * ssl= NULL;    ssl_connection * ssl= NULL;
125    
126      ASSERT(P);
127      ASSERT(action);
128    
129    if ( Run.httpdssl ) {    if ( Run.httpdssl ) {
130            
131      ssl = new_ssl_connection(Run.httpsslpem);      ssl = new_ssl_connection(Run.httpsslpem);
# Line 194  void check_process(char *P, char *action Line 197  void check_process(char *P, char *action
197    if( toggle_validate_flag ) {    if( toggle_validate_flag ) {
198    
199      if( is(action, "start")) {      if( is(action, "start")) {
200    
201          if(Run.debug)
202            log("Starting monitoring -- process %s\n", p->name);
203    
204        LOCK(Run.mutex)        LOCK(Run.mutex)
205          p->do_validate= TRUE;          p->do_validate= TRUE;
206        END_LOCK;        END_LOCK;
207      }      }
208    
209      if( is(action, "stop")) {      if( is(action, "stop")) {
210    
211          if(Run.debug)
212            log("Stoping monitoring -- process %s\n", p->name);
213    
214        LOCK(Run.mutex)        LOCK(Run.mutex)
215          p->do_validate= FALSE;          p->do_validate= FALSE;
216        END_LOCK;        END_LOCK;
# Line 212  void check_process(char *P, char *action Line 223  void check_process(char *P, char *action
223     * pick up the parent process and start the dependants.     * pick up the parent process and start the dependants.
224     */     */
225    if(is(action, "start")) {    if(is(action, "start")) {
226    
227        if(!p->start) {
228          error("%s: Start method not defined -- process %s\n",
229                prog, P);
230          return;
231        }
232            
233      if( p->parent != NULL ) {      if( p->parent != NULL ) {
234        if( !is_process_running(get_process(p->parent)) ) {        if( !is_process_running(get_process(p->parent)) ) {
# Line 222  void check_process(char *P, char *action Line 239  void check_process(char *P, char *action
239      }      }
240    }    }
241    
242      if(is(action, "stop")) {
243    
244        if(!p->stop) {
245          error("%s: Stop method not defined -- process %s\n",
246                prog, P);
247          return;
248        }
249    
250      }
251    
252    control_process(p, action, toggle_validate_flag);    control_process(p, action, toggle_validate_flag);
253    
254  }  }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

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