]> 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>
Mon, 24 Aug 2015 09:18:48 +0000 (11:18 +0200)
fixes #9884

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

index 94f94a7801ac89b82ed760880879c6815e282b13..101efccfe885456c0a0fd689077d6b5e8dad6331 100644 (file)
@@ -21,6 +21,7 @@
 #include "remote/apiclient.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"
@@ -42,6 +43,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)
 { }
@@ -850,3 +853,8 @@ std::set<ApiClient::Ptr> ApiListener::GetAnonymousClients(void) const
        ObjectLock olock(this);
        return m_AnonymousClients;
 }
+
+Value ApiListener::HelloAPIHandler(const MessageOrigin& origin, const Dictionary::Ptr& params)
+{
+       return Empty;
+}
index 93aba2ab94bca9fa3cf20c49df54f077844b5fab..71a33e5785c2e12e00ab04ef1b0a3142824e356c 100644 (file)
@@ -70,6 +70,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);