summaryrefslogtreecommitdiffstats
path: root/opennhrp-status-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'opennhrp-status-html.lsp')
-rw-r--r--opennhrp-status-html.lsp10
1 files changed, 5 insertions, 5 deletions
diff --git a/opennhrp-status-html.lsp b/opennhrp-status-html.lsp
index 765de12..e47e942 100644
--- a/opennhrp-status-html.lsp
+++ b/opennhrp-status-html.lsp
@@ -49,15 +49,15 @@ for k,v in pairs(myform.option or {}) do
for k1,v1 in pairs(v) do
io.write("\n\t\t\t<TR STYLE='padding-bottom:10px;'><TD WIDTH='150px' STYLE='font-weight:bold;padding-left:20px;'><IMG SRC='/static/tango/16x16/status/")
- if (v1) and (string.lower(v1['Type']['value']) == "incomplete") then
+ if (v1) and (v1['Type']) and (v1['Type']['value']) and (string.lower(v1['Type']['value']) == "incomplete") then
io.write("network-error")
- elseif (v1) and (string.lower(v1['Type']['value']) == "negative") then
+ elseif (v1) and (v1['Type']) and (v1['Type']['value']) and (string.lower(v1['Type']['value']) == "negative") then
io.write("network-offline")
- elseif (v1) and (string.lower(v1['Flags']['value']) == "up") then
+ elseif (v1) and (v1['Flags']) and (v1['Flags']['value']) and (string.lower(v1['Flags']['value']) == "up") then
io.write("network-idle")
- elseif (v1) and (string.lower(v1['Flags']['value']) == "used up") then
+ elseif (v1) and (v1['Flags']) and (v1['Flags']['value']) and (string.lower(v1['Flags']['value']) == "used up") then
io.write("network-transmit-receive")
- elseif (v1) and (string.lower(v1['Flags']['value']) == "used up") then
+ elseif (v1) and (v1['Flags']) and (v1['Flags']['value']) and (string.lower(v1['Flags']['value']) == "used up") then
io.write("network-offline")
else
io.write("network-error")