From: Michael Tremer Date: Sun, 28 Sep 2025 12:01:26 +0000 (+0000) Subject: module: Explicitely clear any RRD errors X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45a48778cbcbe422ee25c473387a7c98f2181653;p=collecty.git module: Explicitely clear any RRD errors Signed-off-by: Michael Tremer --- 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; }