refactor: define OTA upgrade flag and MQTT mutex inline

This commit is contained in:
Yurii committed 2026-11-28 00:19:16 +03:00
1 parent aa7385c70f
commit cc6131eac9
7 files changed
+22 -27

No files matched your search

+2 -2
View File
@@ -3606,7 +3606,7 @@ static SettingResult applyAction(Variables& dst, std::string_view action, bool v
}
bool applyAction(std::string_view action, bool value) {
if (vars.states.upgrading || restartTask.scheduled() || restartTask.active()) {
if (upgrading || restartTask.scheduled() || restartTask.active()) {
return false;
}
@@ -3617,7 +3617,7 @@ SettingResult fromJson(const JsonVariantConst src, Variables& dst) {
SettingResult result;
// Admit the whole request before one of its actions schedules a restart.
if (vars.states.upgrading || restartTask.scheduled() || restartTask.active()) {
if (upgrading || restartTask.scheduled() || restartTask.active()) {
return result;
}