From 5ec57f0414b001d906319f126b7d7fdb87d3095e Mon Sep 17 00:00:00 2001 From: Andrey Date: Sat, 27 Jan 2024 15:03:11 +0300 Subject: [PATCH] GET cmd refactored to operate in safe time --- lighthub/main.cpp | 61 +++++++++++++++++++++++++++++++++++++++++++---- lighthub/main.h | 4 +++- 2 files changed, 59 insertions(+), 6 deletions(-) diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 24f935c..7b933a4 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -170,6 +170,13 @@ bool cleanConf(bool wait) { if (!root) return true; bool clean = true; +if (configLocked) + { + errorSerial<1) if (lanStatus>=HAVE_IP_ADDRESS) { - +lanStatus = DO_GET; +return 200; +/* +let Re-Get will be only in safe time int retCode=loadConfigFromHttp(); if (retCode==200) { @@ -1699,6 +1733,7 @@ int retCode=loadConfigFromHttp(); if (configLoaded) lanStatus =IP_READY_CONFIG_LOADED_CONNECTING_TO_BROKER; else lanStatus = DO_READ_RE_CONFIG; return retCode; + */ } errorSerial<