Commit 413b4910 authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Ruben Barkow
Browse files

Fix access of site data while initializing config

The module request that the structure elements are called to get
the actual content of the string. The simple-uci will not do that and
instead cause an exception because the caller didn't provide a string.
parent dbaaff37
......@@ -9,13 +9,13 @@ if site.ssid_changer == nil then
elseif not uci:get('ssid-changer', 'settings', 'enabled') then
uci:section('ssid-changer', 'main', 'settings', {
enabled = '1',
switch_timeframe = site.ssid_changer.switch_timeframe or '30',
first = site.ssid_changer.first or '5',
prefix = site.ssid_changer.prefix or 'FF_Offline_',
suffix = site.ssid_changer.suffix or 'nodename',
tq_limit_enabled = site.ssid_changer.tq_limit_enabled or false,
tq_limit_max = site.ssid_changer.tq_limit_max or 45,
tq_limit_min = site.ssid_changer.tq_limit_min or 35,
switch_timeframe = site.ssid_changer.switch_timeframe() or '30',
first = site.ssid_changer.first() or '5',
prefix = site.ssid_changer.prefix() or 'FF_Offline_',
suffix = site.ssid_changer.suffix() or 'nodename',
tq_limit_enabled = site.ssid_changer.tq_limit_enabled() or false,
tq_limit_max = site.ssid_changer.tq_limit_max() or 45,
tq_limit_min = site.ssid_changer.tq_limit_min() or 35,
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