fixed a bug where charts were giving no data if the whole data range should be evaluated
Costa Tsaousis (ktsaou) committed
Dec 3, 2015 at 09:48 UTC
239c53cdbeeb10233a897ebf9fd6e21e37655a06
1 file changed
+3
-2
src/rrd2json.c
+3
-2
@@ -1625,9 +1625,10 @@ unsigned long rrd_stats_json(int type, RRDSET *st, BUFFER *wb, int points, int g
1625
, stop_at_t
1626
);
1627
1628
- for(; !stop_now ; now -= dt, t--) {
1628
+ long counter = 0;
1629
+ for(; !stop_now ; now -= dt, t--, counter++) {
1630
if(t < 0) t = st->entries - 1;
1630
- if(t == stop_at_t) stop_now = 1;
1631
+ if(t == stop_at_t) stop_now = counter;
1632
1633
int print_this = 0;
1634