You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/05/11 14:06:10 UTC

[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1324: MINIFICPP-1749 Validate C2 property update values

lordgamez commented on code in PR #1324:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1324#discussion_r870346764


##########
libminifi/src/c2/C2Agent.cpp:
##########
@@ -627,19 +628,21 @@ void C2Agent::handlePropertyUpdate(const C2ContentResponse &resp) {
     changeUpdateState(update_property(entry.first, entry.second.to_string(), lifetime));
   }
   // apply changes and persist properties requested to be persisted
-  if (result != state::UpdateState::NO_OPERATION && !configuration_->commitChanges()) {
+  auto propertyWasUpdated = [&](){ return result == state::UpdateState::FULLY_APPLIED || result == state::UpdateState::PARTIALLY_APPLIED; };

Review Comment:
   I only added this lambda for more readability as it is reused for checking if the property was updated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org