Fix ntopng version cache not working

This commit is contained in:
emanuele-f 2017-05-31 22:13:14 +02:00
parent d89f80afdb
commit 86d2ad35a6
3 changed files with 5 additions and 9 deletions

View file

@ -1788,12 +1788,12 @@ function version2int(v)
end
function ntop_version_check()
_rsp = ntop.getCache("ntopng.version", true)
_rsp = ntop.getCache("ntopng.cache.version")
if((_rsp == nil) or (_rsp == "")) then
_rsp = ntop.httpGet("http://www.ntop.org/ntopng.version", "", "", 10)
if((_rsp == nil) or (_rsp["CONTENT"] == nil)) then rsp = "0.0.0" else rsp = _rsp["CONTENT"] end
ntop.setCache("ntopng.version", rsp, 86400)
ntop.setCache("ntopng.cache.version", rsp, 86400)
else
rsp = _rsp
end