From: Michael Friedrich Date: Wed, 22 Jul 2015 10:23:56 +0000 (+0200) Subject: Fix problem with child nodes in http url registry X-Git-Tag: v2.4.0~479 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43ff15cf860433aa15915b2ab4b62e23c9f3de95;p=icinga2 Fix problem with child nodes in http url registry fixes #9703 --- diff --git a/lib/remote/httphandler.cpp b/lib/remote/httphandler.cpp index d785952ac..9716805d7 100644 --- a/lib/remote/httphandler.cpp +++ b/lib/remote/httphandler.cpp @@ -39,8 +39,11 @@ void HttpHandler::Register(const Url::Ptr& url, const HttpHandler::Ptr& handler) node->Set("children", children); } - Dictionary::Ptr sub_node = new Dictionary(); - children->Set(elem, sub_node); + Dictionary::Ptr sub_node = children->Get(elem); + if (!sub_node) { + sub_node = new Dictionary(); + children->Set(elem, sub_node); + } node = sub_node; }