]> git.ipfire.org Git - telemetry.git/commitdiff
source: Renable healthy state to running
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 12 Jul 2026 11:10:44 +0000 (11:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 12 Jul 2026 11:10:44 +0000 (11:10 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/source.c

index 8d7041fc8a1311b6c2197218189c268b45155367..b1e3989a09321dd0b3f0caa2f1be6d29a51f162d 100644 (file)
@@ -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)