[icinga-checkins] icinga.org: icinga2/support/2.4: Remove unused cluster commands

git at icinga.org git at icinga.org
Thu May 12 11:50:27 CEST 2016


Module: icinga2
Branch: support/2.4
Commit: f2e66941790dbb2b26e0b24d388cf5268e62c517
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=f2e66941790dbb2b26e0b24d388cf5268e62c517

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Tue May 10 07:05:10 2016 +0200

Remove unused cluster commands

fixes #11748

---

 lib/icinga/externalcommandprocessor.cpp |   19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/lib/icinga/externalcommandprocessor.cpp b/lib/icinga/externalcommandprocessor.cpp
index 2bb2258..6d1711d 100644
--- a/lib/icinga/externalcommandprocessor.cpp
+++ b/lib/icinga/externalcommandprocessor.cpp
@@ -67,22 +67,6 @@ static std::map<String, ExternalCommandInfo>& GetCommands(void)
 
 boost::signals2::signal<void (double, const String&, const std::vector<String>&)> ExternalCommandProcessor::OnNewExternalCommand;
 
-static Value ExternalCommandAPIWrapper(const String& command, const Dictionary::Ptr& params)
-{
-	std::vector<String> arguments;
-
-	if (params) {
-		int i = 0;
-		while (params->Contains("arg" + Convert::ToString(i))) {
-			arguments.push_back(params->Get("arg" + Convert::ToString(i)));
-			i++;
-		}
-	}
-
-	ExternalCommandProcessor::Execute(Utility::GetTime(), command, arguments);
-	return true;
-}
-
 static void RegisterCommand(const String& command, const ExternalCommandCallback& callback, size_t minArgs = 0, size_t maxArgs = UINT_MAX)
 {
 	boost::mutex::scoped_lock lock(GetMutex());
@@ -91,9 +75,6 @@ static void RegisterCommand(const String& command, const ExternalCommandCallback
 	eci.MinArgs = minArgs;
 	eci.MaxArgs = (maxArgs == UINT_MAX) ? minArgs : maxArgs;
 	GetCommands()[command] = eci;
-
-	ApiFunction::Ptr afunc = new ApiFunction(boost::bind(&ExternalCommandAPIWrapper, command, _2));
-	ApiFunction::Register("extcmd::" + command, afunc);
 }
 
 void ExternalCommandProcessor::Execute(const String& line)



More information about the icinga-checkins mailing list