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.4.0~427 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c657feea1d17f305faea82db9cd05d9ab03c40d;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 5fd6ef9ad..0b941ac8d 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -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 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 ApiListener::GetHttpClients(void) const ObjectLock olock(this); return m_HttpClients; } + +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 9842b5a38..965011544 100644 --- a/lib/remote/apilistener.hpp +++ b/lib/remote/apilistener.hpp @@ -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);