From: Michael Tremer Date: Sun, 12 Jul 2026 11:10:44 +0000 (+0000) Subject: source: Renable healthy state to running X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d0f8ea87e0aaefde166a8f797812f5cd26421a3;p=telemetry.git source: Renable healthy state to running Signed-off-by: Michael Tremer --- diff --git a/src/daemon/source.c b/src/daemon/source.c index 8d7041f..b1e3989 100644 --- a/src/daemon/source.c +++ b/src/daemon/source.c @@ -106,7 +106,7 @@ struct td_source { // State enum td_source_state { - STATE_HEALTHY = 0, + STATE_RUNNING = 0, STATE_FLAPPING, STATE_ERROR, STATE_DISABLED, @@ -132,8 +132,8 @@ static int td_source_change_state(td_source* self, enum td_source_state state) { // 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: @@ -267,9 +267,9 @@ static int td_source_error_detection(td_source* self, int result, uint64_t runti 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); @@ -575,7 +575,7 @@ int td_source_is_disabled(td_source* self) { } 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)