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
if (status != 0)
return (status);
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 */
return (statsd_metric_add (name, (double) (value.gauge / scale.gauge),
STATSD_COUNTER));
} /* }}} int statsd_handle_counter */