summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-04-02 11:58:01 +0000
committerMika Havela <mika.havela@gmail.com>2008-04-02 11:58:01 +0000
commit261b548a04089e8335b5cf8690589273c5b6916f (patch)
treea13915703f99edf4575623f1432186aec4c0a4d3
parenta2a4702e3003cafbfb41b6e1961eb38004405d72 (diff)
downloadacf-opennhrp-261b548a04089e8335b5cf8690589273c5b6916f.tar.bz2
acf-opennhrp-261b548a04089e8335b5cf8690589273c5b6916f.tar.xz
Removed a bug that crashes the view-file.
git-svn-id: svn://svn.alpinelinux.org/acf/opennhrp/trunk@895 ab2d0c66-481e-0410-8bed-d214d4d58bed
-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")