]> granicus.if.org Git - icinga2/commitdiff
Revert "Respect activation priority also on deactivation"
authorMichael Friedrich <michael.friedrich@icinga.com>
Tue, 19 Feb 2019 13:30:44 +0000 (14:30 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Tue, 19 Feb 2019 13:30:44 +0000 (14:30 +0100)
This reverts commit 8ad1717055683c573f81181c7749ba422fa96d13.

lib/base/configobject.cpp

index f8517d61d21e7889c2e19b44dbfe24cc18bd02e0..b73285bc5dc1367dd920d8957ba04511d9f5b023 100644 (file)
@@ -33,7 +33,6 @@
 #include "base/workqueue.hpp"
 #include "base/context.hpp"
 #include "base/application.hpp"
-#include <algorithm>
 #include <fstream>
 #include <boost/exception/errinfo_api_function.hpp>
 #include <boost/exception/errinfo_errno.hpp>
@@ -618,13 +617,7 @@ void ConfigObject::RestoreObjects(const String& filename, int attributeTypes)
 
 void ConfigObject::StopObjects()
 {
-       auto types = Type::GetAllTypes();
-
-       std::sort(types.begin(), types.end(), [](const Type::Ptr& a, const Type::Ptr& b) {
-               return a->GetActivationPriority() > b->GetActivationPriority();
-       });
-
-       for (const Type::Ptr& type : types) {
+       for (const Type::Ptr& type : Type::GetAllTypes()) {
                auto *dtype = dynamic_cast<ConfigType *>(type.get());
 
                if (!dtype)