* ffluci.controller.public.olsr: Renamed a variable to not overwrite Lua core functions
authorSteven Barth <steven@midlink.org>
Tue, 22 Apr 2008 15:06:38 +0000 (15:06 +0000)
committerSteven Barth <steven@midlink.org>
Tue, 22 Apr 2008 15:06:38 +0000 (15:06 +0000)
* ffluci.sys.wifi.iwscan: Fixed Wlan-Scan parsing algorithm
* ffluci.view.sudo_status.iwscan: Fixed Frequency / Channel row to match different kinds of available data

core/src/ffluci/sys.lua
module/public-core/src/controller/public/olsr.lua
module/public-core/src/view/sudo_status/iwscan.htm

index b9d529a8c8a89b895b379f6ec5d827acde7e9441..c97017d8d039f5b381702225f7cf4e0264e23f31 100644 (file)
@@ -241,12 +241,13 @@ function wifi.iwscan()
        for i, l in pairs(ffluci.util.split(ffluci.util.trim(cnt), "\n\n")) do
                local k = l:match("^(.-) ")
                l = l:gsub("^[^\n]+", "", 1)
+               l = ffluci.util.trim(l)
                if k then
                        iws[k] = {}
                        for j, c in pairs(ffluci.util.split(l, "\n          Cell")) do
                                c = c:gsub("^(.-)- ", "", 1)
                                c = ffluci.util.split(c, "\n", 7)
-                               c = table.concat(c, "\n", 1, 7)
+                               c = table.concat(c, "\n", 1)
                                table.insert(iws[k], _parse_mixed_record(c))
                        end
                end
index 0e43ced49f268c8dc7b32aa340419e627435bda2..d41f5ed41da6b82dbbc30be99d0870b44f9921c2 100644 (file)
@@ -104,9 +104,9 @@ end
 
 
 -- Internal
-function fetch_txtinfo(table)
-       table = table or ""
-       local rawdata = ffluci.sys.httpget("http://127.0.0.1:2006/"..table)
+function fetch_txtinfo(otable)
+       otable = otable or ""
+       local rawdata = ffluci.sys.httpget("http://127.0.0.1:2006/"..otable)
        
        if #rawdata == 0 then
                return nil
index 483039f4ee6ceffb30e07ac889de60d56fb72225..8a1ee7254fca64b701ec846c69ea592da1be5831 100644 (file)
@@ -8,7 +8,7 @@ for iface, cells in pairs(ffluci.sys.wifi.iwscan()) do
 <td><%=cell.ESSID%></td>
 <td><%=cell.Address%></td>
 <td><%=cell.Mode%></td>
-<td><%=cell.Channel%></td>
+<td><%=(cell.Channel or cell.Frequency or "")%></td>
 <td><%=cell["Encryption key"]%></td>
 <td><%=cell.Quality%></td>
 <td><%=cell["Signal level"]%></td>