From e16ade899f49107be232e48ddbacc31f30d44efb Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Wed, 28 Jun 2023 17:20:30 +0200 Subject: [#2947] Extra updates --- src/lib/process/d_controller.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/lib/process') diff --git a/src/lib/process/d_controller.cc b/src/lib/process/d_controller.cc index feee1b178d..3611907ed8 100644 --- a/src/lib/process/d_controller.cc +++ b/src/lib/process/d_controller.cc @@ -462,7 +462,7 @@ DControllerBase::configGetHandler(const std::string&, ConstElementPtr DControllerBase::configHashGetHandler(const std::string&, ConstElementPtr /*args*/) { - ElementPtr config = process_->getCfgMgr()->getContext()->toElement(); + ConstElementPtr config = process_->getCfgMgr()->getContext()->toElement(); std::string hash = BaseCommandMgr::getHash(config); ElementPtr params = Element::createMap(); params->set("hash", Element::create(hash)); @@ -650,6 +650,13 @@ DControllerBase::configSetHandler(const std::string&, ConstElementPtr args) { ConstElementPtr answer = updateConfig(module_config); int rcode = 0; parseAnswer(rcode, answer); + + // When succeeded append the SHA256 hash of the config that + // was just set to the response. + if (rcode == CONTROL_RESULT_SUCCESS) { + // @todo + } + // In all cases the right logging configuration is in the context. process_->getCfgMgr()->getContext()->applyLoggingCfg(); return (answer); -- cgit v1.2.3