Developing lightweight computation at the DSG edge

Commit 065b4347 authored by Simó Albert i Beltran's avatar Simó Albert i Beltran
Browse files

Limit ESSID length to 32 characters. Closes #249.

parent aaba5ee6
......@@ -181,7 +181,7 @@ qmp_configure_wifi_device() {
-e s/"#QMP_MAC"/"$mac"/ \
-e s/"#QMP_CHANNEL"/"$channel"/ \
-e s/"#QMP_COUNTRY"/"$country"/ \
-e s/"#QMP_SSID"/"$name"/ \
-e s/"#QMP_SSID"/"${name:0:32}"/ \
-e s/"#QMP_HTMODE"/"$htmode"/ \
-e s/"#QMP_BSSID"/"$bssid"/ \
-e s/"#QMP_TXPOWER"/"$txpower"/ \
......
......@@ -87,7 +87,11 @@ for _,wdev in ipairs(wdevs) do
mode:value("none","Not used")
-- Name
s_wireless:option(Value,"name","Wireless name")
local essid = s_wireless:option(Value,"name","Wireless name")
-- maxlength is documented but not implemented
-- http://luci.subsignal.org/trac/wiki/Documentation/CBI#a.maxlengthnil
-- http://luci.subsignal.org/trac/browser/luci/trunk/libs/web/luasrc/cbi.lua?rev=9834#L1463
essid.maxlength = 32
-- Channel
channel = s_wireless:option(ListValue,"channel","Channel")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment