// State
enum td_source_state {
- STATE_HEALTHY = 0,
+ STATE_RUNNING = 0,
STATE_FLAPPING,
STATE_ERROR,
STATE_DISABLED,
// Log the state change
switch (state) {
- case STATE_HEALTHY:
- DEBUG(self->ctx, "%s is now healthy\n", td_source_name(self));
+ case STATE_RUNNING:
+ DEBUG(self->ctx, "%s is now running\n", td_source_name(self));
break;
case STATE_FLAPPING:
else if (td_source_is_flapping(self))
state = STATE_FLAPPING;
- // Otherwise we must be healthy
+ // Otherwise we are healthy and running
else
- state = STATE_HEALTHY;
+ state = STATE_RUNNING;
// Change state
return td_source_change_state(self, state);
}
int td_source_enable(td_source* self) {
- return td_source_change_state(self, STATE_HEALTHY);
+ return td_source_change_state(self, STATE_RUNNING);
}
// Called to disable the source (e.g. if there is no support for it)