summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e117ee5)
raw | patch | inline | side by side (parent: e117ee5)
author | Florian Forster <octo@collectd.org> | |
Sat, 10 Nov 2012 20:43:08 +0000 (21:43 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 10 Nov 2012 20:43:08 +0000 (21:43 +0100) |
This avoids an annoying and confusing warning.
src/aggregation.c | patch | blob | history |
diff --git a/src/aggregation.c b/src/aggregation.c
index a924223481c42d5a1b611eedd0370aa558f8cf22..e50557d91ab18651ee327cf89e387fa730fe169d 100644 (file)
--- a/src/aggregation.c
+++ b/src/aggregation.c
status = rate_to_value (&v, rate, state, inst->ds_type, t);
if (status != 0)
{
+ /* If this is the first iteration and rate_to_value() was asked to return a
+ * COUNTER or a DERIVE, it will return EAGAIN. Catch this and handle
+ * gracefully. */
+ if (status == EAGAIN)
+ return (0);
+
WARNING ("aggregation plugin: rate_to_value failed with status %i.",
status);
return (-1);