That way, we don't carry over any errors if the source get re-enabled.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
} results;
};
+static void td_source_reset_results(td_source* self) {
+ self->results.num = 0;
+}
+
static int td_source_change_state(td_source* self, enum td_source_state state) {
// If the state has not changed, we are doing nothing
if (self->state == state)
case STATE_DISABLED:
DEBUG(self->ctx, "%s has been disabled\n", td_source_name(self));
+
+ // Reset the results
+ td_source_reset_results(self);
+
break;
}