arpadboda commented on a change in pull request #460: MINIFICPP-479: Add 
processor property descriptor updates. WIP
URL: https://github.com/apache/nifi-minifi-cpp/pull/460#discussion_r241746928
 
 

 ##########
 File path: libminifi/src/c2/C2Agent.cpp
 ##########
 @@ -747,6 +752,20 @@ void C2Agent::handle_update(const C2ContentResponse 
&resp) {
   }
 }
 
+/**
+ * Updates a property
+ */
+bool C2Agent::update_property(const std::string &property_name, const 
std::string &property_value, bool persist) {
+  if (update_service_->canUpdate(property_name)) {
+    configuration_->set(property_name, property_value);
+    if (persist) {
+      configuration_->persistProperties();
+      return true;
+    }
+  }
+  return false;
 
 Review comment:
   This looks a bit strange.
   Why does this function always return false in case persist=false?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to