]> granicus.if.org Git - icinga2/commitdiff
Cli: Fix black/whitelist remove command
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 31 Oct 2014 19:22:24 +0000 (20:22 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 31 Oct 2014 19:22:24 +0000 (20:22 +0100)
refs #7526

lib/cli/nodeblackandwhitelistcommand.cpp
lib/cli/nodeutility.cpp

index 533c447a746c1b46c08bea8e7ff6dd9880cb45bb..927f0ea583aa3be5972cc8838e10a59ebac41d64 100644 (file)
@@ -122,14 +122,6 @@ void BlackAndWhitelistCommand::InitParameters(boost::program_options::options_de
  */
 int BlackAndWhitelistCommand::Run(const boost::program_options::variables_map& vm, const std::vector<std::string>& ap) const
 {
-       String list_path = NodeUtility::GetRepositoryPath() + "/" + m_Type + ".list";
-
-       Dictionary::Ptr lists = make_shared<Dictionary>();
-
-       if (Utility::PathExists(list_path)) {
-               lists = Utility::LoadJsonFile(list_path);
-       }
-
        if (m_Command == BlackAndWhitelistCommandAdd) {
                if (!vm.count("zone")) {
                        Log(LogCritical, "cli", "At least the zone name filter is required!");
index c6435e89456a33c8bfc571a4e77f6698ba562f6e..833e67059a071c63d76c55852930e1d62b44eab3 100644 (file)
@@ -483,7 +483,6 @@ int NodeUtility::RemoveBlackAndWhiteList(const String& type, const String& zone_
                return 1;
        }
 
-       ObjectLock xlock(lists);
        BOOST_FOREACH(int remove, remove_filters) {
                lists->Remove(remove);
        }