[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

0.96test bug



I just discovered 0.96test1 is returning no input and is giving input values as output values:

if i edit "lib/datasources/WeatherMapDataSource_rrd.php" line 266 to

if(preg_match('/^\-?\d+\.?\d*e?[+-]?\d*:?$/i', $lines[1]))
                                {
                                        $data[IN] = floatval($lines[1]);
                                        $data_ok = TRUE;
                                }
                                if(preg_match('/^\-?\d+\.?\d*e?[+-]?\d*:?$/i', $lines[2]))
                                {
                                        $data[OUT] = floatval($lines[2]);
                                        $data_ok = TRUE;
                                }

It returns the correct values as RRDTool returns 1 empty line before returning the data from the PRINT statements, it would be even better to prefix
the PRINT lines with IN and OUT so you can walk all lines outputted by rrdtool for those values...



Erik Versaevel

Copyright 1994-2005, by Howard Jones. howie@thingy.com