Do not send telemetry data in offline mode

This commit is contained in:
Alfredo Cardigliano 2021-07-09 17:08:33 +02:00
parent bd615ef48d
commit af5ded3231

View file

@ -15,6 +15,10 @@ local TELEMETRY_RECORDS_SENT = "ntopng.cache.telemetry_data_sent"
local TELEMETRY_MAX_NUM_RECORDS = 5
function telemetry_utils.telemetry_enabled()
if ntop.isOffline() then
return false
end
local tm = ntop.getPref(TELEMETRY_ENABLED_KEY)
return tm == "1"