From b14027ec73e13b29b78a8bd309c433001f0bcb88 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 8 Feb 2013 07:11:14 +0100 Subject: [PATCH] Move EXPORT_COMPONENT() macros to the beginning of the files. Fixes #3654 --- components/checker/checkercomponent.cpp | 5 ++--- components/compat/compatcomponent.cpp | 4 ++-- components/compatido/compatidocomponent.cpp | 5 ++--- components/delegation/delegationcomponent.cpp | 4 ++-- components/demo/democomponent.cpp | 4 ++-- components/notification/notificationcomponent.cpp | 4 ++-- components/replication/replicationcomponent.cpp | 4 ++-- 7 files changed, 14 insertions(+), 16 deletions(-) diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp index af6e83a4b..5f6694e95 100644 --- a/components/checker/checkercomponent.cpp +++ b/components/checker/checkercomponent.cpp @@ -21,6 +21,8 @@ using namespace icinga; +EXPORT_COMPONENT(checker, CheckerComponent); + void CheckerComponent::Start(void) { m_Endpoint = Endpoint::MakeEndpoint("checker", false); @@ -193,6 +195,3 @@ void CheckerComponent::ObjectRemovedHandler(const DynamicObject::Ptr& object) m_IdleServices.erase(service); m_PendingServices.erase(service); } - -EXPORT_COMPONENT(checker, CheckerComponent); - diff --git a/components/compat/compatcomponent.cpp b/components/compat/compatcomponent.cpp index db0b15b04..2fae796f0 100644 --- a/components/compat/compatcomponent.cpp +++ b/components/compat/compatcomponent.cpp @@ -21,6 +21,8 @@ using namespace icinga; +EXPORT_COMPONENT(compat, CompatComponent); + /** * Hint: The reason why we're using "\n" rather than std::endl is because * std::endl also _flushes_ the output stream which severely degrades @@ -546,5 +548,3 @@ void CompatComponent::StatusTimerHandler(void) if (rename(objectspathtmp.CStr(), objectspath.CStr()) < 0) BOOST_THROW_EXCEPTION(PosixException("rename() failed", errno)); } - -EXPORT_COMPONENT(compat, CompatComponent); diff --git a/components/compatido/compatidocomponent.cpp b/components/compatido/compatidocomponent.cpp index 62181c052..f5a4b4bb9 100644 --- a/components/compatido/compatidocomponent.cpp +++ b/components/compatido/compatidocomponent.cpp @@ -21,6 +21,8 @@ using namespace icinga; +EXPORT_COMPONENT(compatido, CompatIdoComponent); + const String CompatIdoComponent::DefaultSocketAddress = "127.0.0.1"; const String CompatIdoComponent::DefaultSocketPort = "5668"; const String CompatIdoComponent::DefaultInstanceName = "i2-default"; @@ -835,6 +837,3 @@ void CompatIdoComponent::DumpStatusData(void) DumpServiceStatus(service); } } - - -EXPORT_COMPONENT(compatido, CompatIdoComponent); diff --git a/components/delegation/delegationcomponent.cpp b/components/delegation/delegationcomponent.cpp index 3e8d9cfaa..5744b2dc7 100644 --- a/components/delegation/delegationcomponent.cpp +++ b/components/delegation/delegationcomponent.cpp @@ -22,6 +22,8 @@ using namespace icinga; +EXPORT_COMPONENT(delegation, DelegationComponent); + void DelegationComponent::Start(void) { m_DelegationTimer = boost::make_shared(); @@ -203,5 +205,3 @@ void DelegationComponent::DelegationTimerHandler(void) msgbuf << "Updated delegations for " << delegated << " services"; Logger::Write(LogInformation, "delegation", msgbuf.str()); } - -EXPORT_COMPONENT(delegation, DelegationComponent); diff --git a/components/demo/democomponent.cpp b/components/demo/democomponent.cpp index 1b4ab06d7..e2657d078 100644 --- a/components/demo/democomponent.cpp +++ b/components/demo/democomponent.cpp @@ -21,6 +21,8 @@ using namespace icinga; +EXPORT_COMPONENT(demo, DemoComponent); + /** * Starts the component. */ @@ -71,5 +73,3 @@ void DemoComponent::HelloWorldRequestHandler(const Endpoint::Ptr& sender, Logger::Write(LogInformation, "demo", "Got 'hello world' from identity=" + (sender ? sender->GetName() : "(anonymous)")); } - -EXPORT_COMPONENT(demo, DemoComponent); diff --git a/components/notification/notificationcomponent.cpp b/components/notification/notificationcomponent.cpp index c2eb2542f..7dac914c1 100644 --- a/components/notification/notificationcomponent.cpp +++ b/components/notification/notificationcomponent.cpp @@ -21,6 +21,8 @@ using namespace icinga; +EXPORT_COMPONENT(notification, NotificationComponent); + /** * Starts the component. */ @@ -48,5 +50,3 @@ void NotificationComponent::NotificationTimerHandler(void) { // TODO: implement } - -EXPORT_COMPONENT(notification, NotificationComponent); diff --git a/components/replication/replicationcomponent.cpp b/components/replication/replicationcomponent.cpp index fee1d2a96..5995b9cf1 100644 --- a/components/replication/replicationcomponent.cpp +++ b/components/replication/replicationcomponent.cpp @@ -21,6 +21,8 @@ using namespace icinga; +EXPORT_COMPONENT(replication, ReplicationComponent); + /** * Starts the component. */ @@ -248,5 +250,3 @@ void ReplicationComponent::RemoteObjectRemovedHandler(const RequestMessage& requ object->Unregister(); } } - -EXPORT_COMPONENT(replication, ReplicationComponent); -- 2.40.0