From 45a48778cbcbe422ee25c473387a7c98f2181653 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 28 Sep 2025 12:01:26 +0000 Subject: [PATCH] module: Explicitely clear any RRD errors Signed-off-by: Michael Tremer --- src/daemon/module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/daemon/module.c b/src/daemon/module.c index 103c105..a94f4d7 100644 --- a/src/daemon/module.c +++ b/src/daemon/module.c @@ -351,6 +351,7 @@ static int collecty_module_create_database(collecty_module* self, const char* pa r = rrd_create_r(path, STEPSIZE, 0, collecty_args_argc(args), collecty_args_argv(args)); if (r < 0) { ERROR(self->ctx, "Failed to create %s: %s\n", path, rrd_get_error()); + rrd_clear_error(); r = -EINVAL; } @@ -394,6 +395,7 @@ int collecty_module_commit(collecty_module* self, r = rrd_update_r(path, NULL, num_samples, samples); if (r < 0) { ERROR(self->ctx, "Failed to write to %s: %s\n", path, rrd_get_error()); + rrd_clear_error(); return -EFAULT; } -- 2.47.3