Skip to content

Commit

Permalink
applications/olsr-services: fix error on public services page
Browse files Browse the repository at this point in the history
  • Loading branch information
mmunz committed Feb 19, 2015
1 parent 8b123df commit 47603a3
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -93,9 +93,9 @@
local rv = {}
for k, line in ipairs(services) do
local field = utl.split(line, "[#|]", split, true)
local origin_lnk = ip.IPv6(pcdata(field[4])) or ""
local origin_lnk = ip.IPv6(pcdata(field[4]))
local origin_link = ""
if #origin_lnk ~= 0 and origin_lnk:is6() then
if origin_lnk and origin_lnk:is6() then
origin_link = "["..origin_lnk:string().."]"
else
origin_link = pcdata(field[4])
Expand Down Expand Up @@ -168,9 +168,9 @@ <h2><a id="content" name="content"><%:Services%></a></h2>
local field = {}
-- split line at # and |, 1=url, 2=proto, 3=description, 4=source
local field = utl.split(line, "[#|]", split, true)
local origin_lnk = ip.IPv6(pcdata(field[4])) or ""
local origin_lnk = ip.IPv6(pcdata(field[4]))
local origin_link
if #origin_lnk ~= 0 and origin_lnk:is6() then
if origin_lnk and origin_lnk:is6() then
origin_link = "["..origin_lnk:string().."]"
else
origin_link = pcdata(field[4])
Expand Down

0 comments on commit 47603a3

Please sign in to comment.