Software /
code /
prosody
Changeset
6650:cf15b18e9810
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 05 May 2015 01:34:20 +0200 |
parents | 6647:0c363fddcdd9 (current diff) 6649:99fa40d498cc (diff) |
children | 6666:42fdc8dddf04 |
files | |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/util/events.lua Sun May 03 18:39:27 2015 +0200 +++ b/util/events.lua Tue May 05 01:34:20 2015 +0200 @@ -9,6 +9,7 @@ local pairs = pairs; local t_insert = table.insert; +local t_remove = table.remove; local t_sort = table.sort; local setmetatable = setmetatable; local next = next; @@ -118,7 +119,7 @@ if not w then return; end for i = #w, 1 do if w[i] == wrapper then - table.remove(w, i); + t_remove(w, i); end end if #w == 0 then
--- a/util/statistics.lua Sun May 03 18:39:27 2015 +0200 +++ b/util/statistics.lua Tue May 05 01:34:20 2015 +0200 @@ -88,7 +88,7 @@ return function (value) n_actual_events = n_actual_events + 1; - if n_actual_events%duration_sample_interval > 0 then + if n_actual_events%duration_sample_interval == 1 then last_event = (last_event%duration_max_samples) + 1; events[last_event] = value; end @@ -113,7 +113,7 @@ return function () n_actual_events = n_actual_events + 1; - if n_actual_events%duration_sample_interval > 0 then + if n_actual_events%duration_sample_interval ~= 1 then return nop_function; end