102 |
* that the error flag is set for the passed event, we will allow it (i.e. |
* that the error flag is set for the passed event, we will allow it (i.e. |
103 |
* event queue was flushed during monit reload and the service was in |
* event queue was flushed during monit reload and the service was in |
104 |
* failed state before reload) */ |
* failed state before reload) */ |
105 |
if(!state && !(service->error & id)) |
if(state != STATE_FAILED && !(service->error & id)) |
106 |
return; |
return; |
107 |
|
|
108 |
/* Initialize event list and add first event. */ |
/* Initialize event list and add first event. */ |
165 |
{ |
{ |
166 |
/* Only first failed event can initialize the queue for given event type, |
/* Only first failed event can initialize the queue for given event type, |
167 |
* thus passed events are ignored until first error */ |
* thus passed events are ignored until first error */ |
168 |
if(!state) |
if(state != STATE_FAILED) |
169 |
return; |
return; |
170 |
|
|
171 |
/* Event was not found in the pending events list, we will add it. */ |
/* Event was not found in the pending events list, we will add it. */ |
272 |
|
|
273 |
ASSERT(E); |
ASSERT(E); |
274 |
|
|
275 |
|
/* Only the true failed state condition can change the initial state */ |
276 |
|
if(S == STATE_PASSED && E->state == STATE_INIT) |
277 |
|
{ |
278 |
|
return FALSE; |
279 |
|
} |
280 |
|
|
281 |
action = (S == STATE_PASSED)?E->action->passed:E->action->failed; |
action = (S == STATE_PASSED)?E->action->passed:E->action->failed; |
282 |
|
|
283 |
/* Compare as many bits as cycles able to trigger the action */ |
/* Compare as many bits as cycles able to trigger the action */ |