From 427802c61b05ae810b1e6e963814e3d4ba7e81e5 Mon Sep 17 00:00:00 2001 From: Sylvestre Gallon Date: Fri, 1 Nov 2019 21:12:27 +0100 Subject: [PATCH] fix(cv): c++11 does not allow us to erase during a foreach... fix(chore): bump version and add release_notes enh(core): update release notes --- CMakeLists.txt | 2 +- doc/release_notes/engine19.10.rst | 20 ++++++++++++++++++++ src/configuration/applier/contact.cc | 2 +- src/configuration/applier/host.cc | 2 +- src/configuration/applier/service.cc | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b04810e1a..5ed030f30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ include_directories("${INC_DIR}/compatibility") # Version. set(CENTREON_ENGINE_MAJOR 19) set(CENTREON_ENGINE_MINOR 10) -set(CENTREON_ENGINE_PATCH 3) +set(CENTREON_ENGINE_PATCH 4) if (CENTREON_ENGINE_PRERELEASE) set(CENTREON_ENGINE_VERSION "${CENTREON_ENGINE_MAJOR}.${CENTREON_ENGINE_MINOR}.${CENTREON_ENGINE_PATCH}-${CENTREON_ENGINE_PRERELEASE}") else () diff --git a/doc/release_notes/engine19.10.rst b/doc/release_notes/engine19.10.rst index 8252afb12..1409c9983 100644 --- a/doc/release_notes/engine19.10.rst +++ b/doc/release_notes/engine19.10.rst @@ -1,3 +1,23 @@ +======================= +Centreon Engine 19.10.4 +======================= + +********* +Bug fixes +********* + +Custom variable update crash on reload +====================================== +A bug was introduce in 19.10.2 with a reload on custom_variables +services/contacts/hosts update. + +Recovery notification didn't work on escalation [1;0] +===================================================== +If an escalation was defined with a first notification at 1 and a +last notification at 0, we want the escalation to start from the +first notification, but only one time, the recovery notification +was not sent. + ======================= Centreon Engine 19.10.3 ======================= diff --git a/src/configuration/applier/contact.cc b/src/configuration/applier/contact.cc index 65769b65d..2976d88fc 100644 --- a/src/configuration/applier/contact.cc +++ b/src/configuration/applier/contact.cc @@ -351,8 +351,8 @@ void applier::contact::modify_object(configuration::contact const& obj) { cus.first.c_str(), cus.second.get_value().c_str(), &tv); } - c->get_custom_variables().erase(cus.first); } + c->get_custom_variables().clear(); for (auto& cus: obj.customvariables()) { c->get_custom_variables()[cus.first] = cus.second; diff --git a/src/configuration/applier/host.cc b/src/configuration/applier/host.cc index 2982590b4..b26898ce7 100644 --- a/src/configuration/applier/host.cc +++ b/src/configuration/applier/host.cc @@ -392,8 +392,8 @@ void applier::host::modify_object( c.first.c_str(), c.second.get_value().c_str(), &tv); } - it_obj->second->custom_variables.erase(c.first); } + it_obj->second->custom_variables.clear(); for (auto& c: obj.customvariables()) { it_obj->second->custom_variables[c.first] = c.second; diff --git a/src/configuration/applier/service.cc b/src/configuration/applier/service.cc index df81237b2..cdf322424 100644 --- a/src/configuration/applier/service.cc +++ b/src/configuration/applier/service.cc @@ -485,8 +485,8 @@ void applier::service::modify_object( NEBTYPE_SERVICECUSTOMVARIABLE_DELETE, NEBFLAG_NONE, NEBATTR_NONE, s.get(), c.first.c_str(), c.second.get_value().c_str(), &tv); } - s->custom_variables.erase(c.first); } + s->custom_variables.clear(); for (auto& c: obj.customvariables()) { s->custom_variables[c.first] = c.second;