howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
425 stars 94 forks source link

Issues reading RRD files with WeatherMapDataSource_rrd #102

Closed hadeshimself closed 7 years ago

hadeshimself commented 7 years ago

I have multiple RRD targets and only the first one from the LINKs list was working properly. I found out that the condition at WeatherMapDataSource_rrd.php:469 is only valid after the first run. Subsequent calls to ReadData() will get a "dirty" copy of $this->data[IN] and $this->data[OUT] and the code goes through with old data creating huge values that will get multiplied every iteration.

Setting both as null at the beginning of ReadData() like in older releases fixes it.

howardjones commented 7 years ago

I've been busy this afternoon. I think you have this morning's code :-) This is #93 and #100.

Please pull the current and confirm, though! (nice faultfinding - it took me a few goes around to get to where you are)

hadeshimself commented 7 years ago

:-) That was fast. Yes, I had code pulled from this morning. I'll have to sync more often then! Thanks.