Change to convert a float to an integer prior to call rrd_update. This patch should fix #122.

This commit is contained in:
Luca Deri 2015-08-11 22:26:17 +02:00
parent 603e9d8898
commit d609b8c80d
2 changed files with 9 additions and 3 deletions

View file

@ -346,6 +346,12 @@ function round(num, idp)
return tonumber(string.format("%." .. (idp or 0) .. "f", num))
end
-- Note that the function below returns a string as returnong a number
-- would not help as a new float would be returned
function toint(num)
return string.format("%u", num)
end
-- Convert bytes to human readable format
function bytesToSize(bytes)
if(bytes == nil) then