Changeset 8329 for luci/trunk

Show
Ignore:
Timestamp:
03/04/12 19:35:13 (15 months ago)
Author:
jow
Message:

modules/admin-full: scan three times to catch more networks in wifi join setup

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/modules/admin-full/luasrc/view/admin_network/wifi_join.htm

    r7534 r8329  
    7373        return 
    7474    end 
     75 
     76 
     77    function scanlist(times) 
     78        local i, k, v 
     79        local l = { } 
     80        local s = { } 
     81 
     82        for i = 1, times do 
     83            for k, v in ipairs(iw.scanlist) do 
     84                if not s[v.bssid] then 
     85                    l[#l+1] = v 
     86                    s[v.bssid] = true 
     87                end 
     88            end 
     89        end 
     90 
     91        return l 
     92    end 
    7593-%> 
    7694 
     
    83101        <table class="cbi-section-table" style="empty-cells:hide"> 
    84102            <!-- scan list --> 
    85             <% for i, net in ipairs(iw.scanlist) do net.encryption = net.encryption or { } %> 
     103            <% for i, net in ipairs(scanlist(3)) do net.encryption = net.encryption or { } %> 
    86104            <tr class="cbi-section-table-row cbi-rowstyle-<%=1 + ((i-1) % 2)%>"> 
    87105                <td class="cbi-value-field" style="width:16px; padding:3px">