]> granicus.if.org Git - icinga2/commitdiff
Fix warnings about invalid API function 'icinga::Hello'
authorGunnar Beutner <gunnar@beutner.name>
Tue, 11 Aug 2015 12:13:53 +0000 (14:13 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 11 Aug 2015 12:19:20 +0000 (14:19 +0200)
fixes #9884

lib/remote/apilistener.cpp
lib/remote/apilistener.hpp

index 5fd6ef9ad3aeba9ad47d7d81d57f1cf08700e501..0b941ac8d8e36f10fcf9ae9ea0b0176652e0b217 100644 (file)
@@ -22,6 +22,7 @@
 #include "remote/jsonrpcconnection.hpp"
 #include "remote/endpoint.hpp"
 #include "remote/jsonrpc.hpp"
+#include "remote/apifunction.hpp"
 #include "base/convert.hpp"
 #include "base/netstring.hpp"
 #include "base/json.hpp"
@@ -43,6 +44,8 @@ boost::signals2::signal<void(bool)> ApiListener::OnMasterChanged;
 
 REGISTER_STATSFUNCTION(ApiListenerStats, &ApiListener::StatsFunc);
 
+REGISTER_APIFUNCTION(Hello, icinga, &ApiListener::HelloAPIHandler);
+
 ApiListener::ApiListener(void)
        : m_LogMessageCount(0)
 { }
@@ -922,3 +925,8 @@ std::set<HttpConnection::Ptr> ApiListener::GetHttpClients(void) const
        ObjectLock olock(this);
        return m_HttpClients;
 }
+
+Value ApiListener::HelloAPIHandler(const MessageOrigin& origin, const Dictionary::Ptr& params)
+{
+       return Empty;
+}
index 9842b5a3849f351da0b6b01d21f397181a4db94b..96501154406b4cb0a30a104778105d68a7b0449b 100644 (file)
@@ -75,6 +75,7 @@ public:
 
        static Value ConfigUpdateHandler(const MessageOrigin& origin, const Dictionary::Ptr& params);
 
+       static Value HelloAPIHandler(const MessageOrigin& origin, const Dictionary::Ptr& params);
 protected:
        virtual void OnConfigLoaded(void);
        virtual void OnAllConfigLoaded(void);