Comparison

core/statsmanager.lua @ 7664:4f145a9f1477

core.statsmanager: Use correct variable for config validation [luacheck]
author Kim Alvefur <zash@zash.se>
date Mon, 12 Sep 2016 16:08:34 +0200
parent 7533:4ef37ac69562
child 9804:7929e0fe0577
comparison
equal deleted inserted replaced
7663:54424e981796 7664:4f145a9f1477
4 local timer = require "util.timer"; 4 local timer = require "util.timer";
5 local fire_event = prosody.events.fire_event; 5 local fire_event = prosody.events.fire_event;
6 6
7 local stats_interval_config = config.get("*", "statistics_interval"); 7 local stats_interval_config = config.get("*", "statistics_interval");
8 local stats_interval = tonumber(stats_interval_config); 8 local stats_interval = tonumber(stats_interval_config);
9 if stats_config and not stats_interval then 9 if stats_interval_config and not stats_interval then
10 log("error", "Invalid 'statistics_interval' setting, statistics will be disabled"); 10 log("error", "Invalid 'statistics_interval' setting, statistics will be disabled");
11 end 11 end
12 12
13 local stats_provider_name; 13 local stats_provider_name;
14 local stats_provider_config = config.get("*", "statistics"); 14 local stats_provider_config = config.get("*", "statistics");