From 88e3d0bd3fdf846a93ea8fb1f39d50531c77046c Mon Sep 17 00:00:00 2001 From: Phat Nguyen Date: Wed, 21 Aug 2024 12:54:06 +0700 Subject: [PATCH] Ignore and return failed if `configurationControl` is `cloud` --- src/AgConfigure.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/AgConfigure.cpp b/src/AgConfigure.cpp index 4518f24..99e00c1 100644 --- a/src/AgConfigure.cpp +++ b/src/AgConfigure.cpp @@ -264,12 +264,14 @@ bool Configuration::parse(String data, bool isLocal) { jconfig[jprop_configurationControl]); } - /** Check to return result if configurationControl is 'cloud' */ - if (ctrl == - String(CONFIGURATION_CONTROL_NAME - [ConfigurationControl::ConfigurationControlCloud])) { - failedMessage = String(msg); - return true; + /** Return failed if new "configurationControl" new and old is "cloud" */ + if (ctrl == String(CONFIGURATION_CONTROL_NAME [ConfigurationControl::ConfigurationControlCloud])) { + if(ctrl != lastCtrl) { + return true; + } else { + failedMessage = String(msg); + return false; + } } } else { failedMessage =