summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e51085e)
raw | patch | inline | side by side (parent: e51085e)
author | Florian Forster <octo@collectd.org> | |
Fri, 26 Jul 2013 13:18:43 +0000 (15:18 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 26 Jul 2013 13:18:43 +0000 (15:18 +0200) |
statsd_parse_value() will write to (value_t).gauge, so don't read from another
member of the union. This also fixes problems with counter values being zero,
for whatever that is supposed to be useful for.
Github: #358
member of the union. This also fixes problems with counter values being zero,
for whatever that is supposed to be useful for.
Github: #358
src/statsd.c | patch | blob | history |
diff --git a/src/statsd.c b/src/statsd.c
index b697a347c838a61d6c28223e2c8a3e8014572e50..5af34833fbbbff4cb611f4c5ee0b24d2ace5b305 100644 (file)
--- a/src/statsd.c
+++ b/src/statsd.c
if (status != 0)
return (status);
- if (value.derive < 1)
- return (-1);
-
return (statsd_metric_add (name, (double) (value.gauge / scale.gauge),
STATSD_COUNTER));
} /* }}} int statsd_handle_counter */