lordgamez commented on a change in pull request #1255:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1255#discussion_r801643210



##########
File path: libminifi/src/c2/C2Agent.cpp
##########
@@ -556,6 +519,43 @@ void C2Agent::handle_describe(const C2ContentResponse 
&resp) {
   enqueue_c2_response(std::move(response));
 }
 
+void C2Agent::handle_clear(const C2ContentResponse &resp) {
+  if (resp.name == "connection") {
+    for (const auto& connection : resp.operation_arguments) {
+      logger_->log_debug("Clearing connection %s", 
connection.second.to_string());
+      update_sink_->clearConnection(connection.second.to_string());
+    }
+  } else if (resp.name == "repositories") {
+    update_sink_->drainRepositories();
+  } else if (resp.name == "corecomponentstate") {
+    for (const auto& corecomponent : resp.operation_arguments) {
+      std::vector<std::shared_ptr<state::StateController>> components = 
update_sink_->getComponents(corecomponent.second.to_string());

Review comment:
       Now we iterate through the requrested components in the operation 
arguments instead of using the previously constant `"corecomponentstate"` which 
was set in the resp.name




-- 
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-unsubscr...@nifi.apache.org

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


Reply via email to