Fixed more compilation problems.

This commit is contained in:
Gunnar Beutner 2012-04-01 13:57:22 +02:00
parent b4a51c98c7
commit 41f620a8f0
3 changed files with 9 additions and 8 deletions

View File

@ -1,7 +1,7 @@
#include "i2-configrpccomponent.h" #include "i2-configrpccomponent.h"
using namespace icinga; using namespace icinga;
using std::dynamic_pointer_cast; using std::tr1::dynamic_pointer_cast;
IcingaApplication::RefType ConfigRpcComponent::GetIcingaApplication(void) IcingaApplication::RefType ConfigRpcComponent::GetIcingaApplication(void)
{ {
@ -81,7 +81,7 @@ int ConfigRpcComponent::FetchObjectsHandler(NewMessageEventArgs::RefType ea)
int ConfigRpcComponent::LocalObjectCreatedHandler(ConfigHiveEventArgs::RefType ea) int ConfigRpcComponent::LocalObjectCreatedHandler(ConfigHiveEventArgs::RefType ea)
{ {
ConnectionManager::RefType connectionManager = GetIcingaApplication()->GetConnectionManager(); ConnectionManager::RefType connectionManager = GetIcingaApplication()->GetConnectionManager();
connectionManager->SendMessage(MakeObjectMessage(ea->ConfigObject, "config::ObjectCreated", true)); connectionManager->SendMessage(MakeObjectMessage(ea->Object, "config::ObjectCreated", true));
return 0; return 0;
} }
@ -89,17 +89,17 @@ int ConfigRpcComponent::LocalObjectCreatedHandler(ConfigHiveEventArgs::RefType e
int ConfigRpcComponent::LocalObjectRemovedHandler(ConfigHiveEventArgs::RefType ea) int ConfigRpcComponent::LocalObjectRemovedHandler(ConfigHiveEventArgs::RefType ea)
{ {
ConnectionManager::RefType connectionManager = GetIcingaApplication()->GetConnectionManager(); ConnectionManager::RefType connectionManager = GetIcingaApplication()->GetConnectionManager();
connectionManager->SendMessage(MakeObjectMessage(ea->ConfigObject, "config::ObjectRemoved", false)); connectionManager->SendMessage(MakeObjectMessage(ea->Object, "config::ObjectRemoved", false));
return 0; return 0;
} }
int ConfigRpcComponent::LocalPropertyChangedHandler(ConfigHiveEventArgs::RefType ea) int ConfigRpcComponent::LocalPropertyChangedHandler(ConfigHiveEventArgs::RefType ea)
{ {
JsonRpcMessage::RefType msg = MakeObjectMessage(ea->ConfigObject, "config::ObjectRemoved", false); JsonRpcMessage::RefType msg = MakeObjectMessage(ea->Object, "config::ObjectRemoved", false);
cJSON *params = msg->GetParams(); cJSON *params = msg->GetParams();
cJSON_AddStringToObject(params, "property", ea->Property.c_str()); cJSON_AddStringToObject(params, "property", ea->Property.c_str());
string value = ea->ConfigObject->GetProperty(ea->Property); string value = ea->Object->GetProperty(ea->Property);
cJSON_AddStringToObject(params, "value", value.c_str()); cJSON_AddStringToObject(params, "value", value.c_str());
ConnectionManager::RefType connectionManager = GetIcingaApplication()->GetConnectionManager(); ConnectionManager::RefType connectionManager = GetIcingaApplication()->GetConnectionManager();

View File

@ -6,10 +6,11 @@ bin_PROGRAMS = \
icinga_SOURCES = \ icinga_SOURCES = \
icingaapplication.cpp \ icingaapplication.cpp \
icingaapplication.h icingaapplication.h \
i2-icinga.h
icinga_CXXFLAGS = -I${top_srcdir}/base \ icinga_CXXFLAGS = -I${top_srcdir}/base \
-I${top_srcdir}/jsonrpc -I${top_srcdir}/jsonrpc
icinga_LDFLAGS = $(top_builddir)/base/libbase.a \ icinga_LDFLAGS = $(top_builddir)/base/libbase.a \
$(top_builddir)/jsonrpc/libjsonrpc.a $(top_builddir)/jsonrpc/libjsonrpc.a -lltdl

View File

@ -11,4 +11,4 @@ miniapp_CXXFLAGS = -I${top_srcdir}/base \
-I${top_srcdir}/jsonrpc -I${top_srcdir}/jsonrpc
miniapp_LDFLAGS = $(top_builddir)/base/libbase.a \ miniapp_LDFLAGS = $(top_builddir)/base/libbase.a \
$(top_builddir)/jsonrpc/libjsonrpc.a $(top_builddir)/jsonrpc/libjsonrpc.a -lltdl