From 9b4841912cb0cff3a00cbb623b9f307d760fe31b Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Tue, 7 Jun 2022 13:42:07 -0700 Subject: [PATCH] Management framework: also use send_set_configuration_response_error elsewhere --- .../policy/frameworks/management/controller/main.zeek | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/policy/frameworks/management/controller/main.zeek b/scripts/policy/frameworks/management/controller/main.zeek index 08b7804e1b..a0100355ab 100644 --- a/scripts/policy/frameworks/management/controller/main.zeek +++ b/scripts/policy/frameworks/management/controller/main.zeek @@ -552,16 +552,12 @@ event Management::Controller::API::set_configuration_request(reqid: string, conf # At the moment there can only be one pending request. if ( g_config_reqid_pending != "" ) { - res = Management::Result($reqid=reqid); - res$success = F; - res$error = fmt("request %s still pending", g_config_reqid_pending); - req$results += res; + send_set_configuration_response_error(req, + fmt("request %s still pending", g_config_reqid_pending)); + Management::Request::finish(req$id); Management::Log::info(fmt("tx Management::Controller::API::set_configuration_response %s", Management::Request::to_string(req))); - Broker::publish(Management::Controller::topic, - Management::Controller::API::set_configuration_response, req$id, req$results); - Management::Request::finish(req$id); return; }