From: Gunnar Beutner Date: Tue, 11 Aug 2015 12:13:53 +0000 (+0200) Subject: Fix warnings about invalid API function 'icinga::Hello' X-Git-Tag: v2.3.9~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1b9d8289613d349ca632bc6370ffa8304767504;p=icinga2 Fix warnings about invalid API function 'icinga::Hello' fixes #9884 --- diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 94f94a780..101efccfe 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -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 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 ApiListener::GetAnonymousClients(void) const ObjectLock olock(this); return m_AnonymousClients; } + +Value ApiListener::HelloAPIHandler(const MessageOrigin& origin, const Dictionary::Ptr& params) +{ + return Empty; +} diff --git a/lib/remote/apilistener.hpp b/lib/remote/apilistener.hpp index 93aba2ab9..71a33e578 100644 --- a/lib/remote/apilistener.hpp +++ b/lib/remote/apilistener.hpp @@ -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);