aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xapt-panopticon-report-email-web.lua8
-rwxr-xr-xapt-panopticon.lua12
2 files changed, 6 insertions, 14 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
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 5aa1e8d..f0a3128 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -1055,17 +1055,9 @@ if 0 < #arg then
1055 end 1055 end
1056 end 1056 end
1057 1057
1058 results["timeout"] = false
1058 else 1059 else
1059 for k, v in pairs{"ftp", "http", "https", "rsync"} do 1060 results["timeout"] = true
1060 if testing(v) then
1061 local tests = results[v]
1062 if testing("Integrity") then tests.Integrity = {errors = -1; warnings = -1} end
1063 if testing("Protocol") then tests.Protocol = {errors = -1; warnings = -1} end
1064 if testing("Updated") then tests.Updated = {errors = -1; warnings = -1} end
1065 if testing("URLSanity") then tests.URLSanity = {errors = -1; warnings = -1} end
1066 results[v] = tests
1067 end
1068 end
1069 end 1061 end
1070 end 1062 end
1071 1063