diff options
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon-report-email-web.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 9e9d818..3f2f257 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
@@ -169,7 +169,7 @@ local status = function(host, results, typ) | |||
169 | local e = 0 | 169 | local e = 0 |
170 | local w = 0 | 170 | local w = 0 |
171 | local s = nil ~= mirrors[host].Protocols[typ] | 171 | local s = nil ~= mirrors[host].Protocols[typ] |
172 | local to = false | 172 | local to = results.timeout |
173 | if ('http' ~= typ) and ('https' ~= typ) and ('ftp' ~= typ) and ('rsync' ~= typ) then s = true end | 173 | if ('http' ~= typ) and ('https' ~= typ) and ('ftp' ~= typ) and ('rsync' ~= typ) then s = true end |
174 | if nil ~= results[typ] then | 174 | if nil ~= results[typ] then |
175 | e = results[typ].errors | 175 | e = results[typ].errors |
@@ -188,8 +188,8 @@ local status = function(host, results, typ) | |||
188 | for i, u in pairs(v) do | 188 | for i, u in pairs(v) do |
189 | if "table" == type(u) then | 189 | if "table" == type(u) then |
190 | if typ == i then | 190 | if typ == i then |
191 | if 0 <= u.errors then e = e + u.errors else to = true end | 191 | if 0 <= u.errors then e = e + u.errors end |
192 | if 0 <= u.warnings then w = w + u.warnings else to = true end | 192 | if 0 <= u.warnings then w = w + u.warnings end |
193 | end | 193 | end |
194 | end | 194 | end |
195 | end | 195 | end |
@@ -262,7 +262,7 @@ local collate = function(host, ip, results) | |||
262 | end | 262 | end |
263 | end | 263 | end |
264 | end | 264 | end |
265 | else | 265 | elseif "timeout" ~= k then |
266 | local a = results[k] | 266 | local a = results[k] |
267 | if nil == a then a = 0 end | 267 | if nil == a then a = 0 end |
268 | results[k] = a + v | 268 | results[k] = a + v |