@cryptotaxi247 / netdata-1 / commits / 882343c21

fixed reversed match of dimensions updating

Costa Tsaousis (ktsaou) committed Jun 8, 2017 at 23:02 UTC 882343c214e6a4653756409420320ff24cc9a812
1 file changed +3 -3
src/rrddim.c
+3 -3
@@ -51,7 +51,7 @@ inline int rrddim_set_name(RRDSET *st, RRDDIM *rd, const char *name) {
51 }
52
53 inline int rrddim_set_algorithm(RRDSET *st, RRDDIM *rd, RRD_ALGORITHM algorithm) {
54 - if(unlikely(rd->algorithm != algorithm))
54 + if(unlikely(rd->algorithm == algorithm))
55 return 0;
56
57 debug(D_RRD_CALLS, "Updating algorithm of dimension '%s/%s' from %s to %s", st->id, rd->name, rrd_algorithm_name(rd->algorithm), rrd_algorithm_name(algorithm));
@@ -61,7 +61,7 @@ inline int rrddim_set_algorithm(RRDSET *st, RRDDIM *rd, RRD_ALGORITHM algorithm)
61 }
62
63 inline int rrddim_set_multiplier(RRDSET *st, RRDDIM *rd, collected_number multiplier) {
64 - if(unlikely(rd->multiplier != multiplier))
64 + if(unlikely(rd->multiplier == multiplier))
65 return 0;
66
67 debug(D_RRD_CALLS, "Updating multiplier of dimension '%s/%s' from " COLLECTED_NUMBER_FORMAT " to " COLLECTED_NUMBER_FORMAT, st->id, rd->name, rd->multiplier, multiplier);
@@ -71,7 +71,7 @@ inline int rrddim_set_multiplier(RRDSET *st, RRDDIM *rd, collected_number multip
71 }
72
73 inline int rrddim_set_divisor(RRDSET *st, RRDDIM *rd, collected_number divisor) {
74 - if(unlikely(rd->divisor != divisor))
74 + if(unlikely(rd->divisor == divisor))
75 return 0;
76
77 debug(D_RRD_CALLS, "Updating divisor of dimension '%s/%s' from " COLLECTED_NUMBER_FORMAT " to " COLLECTED_NUMBER_FORMAT, st->id, rd->name, rd->divisor, divisor);