[luci] luci crashing when too much values in a ListValue

Bryan Mayland bmayland at leoninedev.com
Tue Aug 2 21:42:35 CEST 2011


I believe you're recursively adding items to the list?  You're creating 
a ListValue for selecting channels but for each value in the list you're 
adding a list of values.   You shouldn't be building the list from 
cfgvalue(), which I believe is for converting the UCI value to a display 
value or at least something along those lines.

On 8/2/2011 1:31 PM, Pau wrote:
> -----------------------------------------------------------------------------------
> channel = s_wireless:option(ListValue,"channel","Channel")
> channel:value("0","0")
>
> function channel.cfgvalue(self, section)
>     local dev = m.uci:get("qmp", section, "device")
>     for _,ch in ipairs(luci.sys.wifi.channels(dev)) do
>         channel:value(ch.channel, ch.channel)
>     end
>     return ListValue.cfgvalue(self, section)
> end
> -----------------------------------------------------------------------------------
>
> When LuCi is trying to show this page, still thinking all the time 
> showing nothing. 


More information about the luci mailing list