mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 18:07:52 +00:00
cloud_discovery: Skip rewriting discovery.state.json when no discovery metho d is set
In cases where gateway.json exists, the discovery method may be unset. Writing an empty value to discovery.state.json is not useful, so avoid updating the file in this case. Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
This commit is contained in:
committed by
John Crispin
parent
957e3ca997
commit
ed57759824
@@ -102,6 +102,9 @@ function gateway_load() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function discovery_state_write() {
|
function discovery_state_write() {
|
||||||
|
if (length(discovery_method) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
let discovery_state = {
|
let discovery_state = {
|
||||||
"type": discovery_method,
|
"type": discovery_method,
|
||||||
"updated": time()
|
"updated": time()
|
||||||
|
|||||||
Reference in New Issue
Block a user