[icinga-checkins] icinga.org: icinga2/master: Remove stale subscriptions from local endpoint

git at icinga.org git at icinga.org
Thu Jan 24 10:23:16 CET 2013


Module: icinga2
Branch: master
Commit: 19d654b7c2f2e16a132ed73e097d865e6280ca58
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=19d654b7c2f2e16a132ed73e097d865e6280ca58

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Jan 24 10:21:26 2013 +0100

Remove stale subscriptions from local endpoint

Fixes #3563

---

 lib/remoting/endpointmanager.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/remoting/endpointmanager.cpp b/lib/remoting/endpointmanager.cpp
index 077b106..883b260 100644
--- a/lib/remoting/endpointmanager.cpp
+++ b/lib/remoting/endpointmanager.cpp
@@ -331,7 +331,8 @@ void EndpointManager::SubscriptionTimerHandler(void)
 	BOOST_FOREACH(tie(tuples::ignore, object), DynamicType::GetByName("Endpoint")->GetObjects()) {
 		Endpoint::Ptr endpoint = dynamic_pointer_cast<Endpoint>(object);
 
-		if (!endpoint->IsLocalEndpoint())
+		/* don't copy subscriptions from non-local endpoints or the identity endpoint */
+		if (!endpoint->IsLocalEndpoint() || endpoint == m_Endpoint)
 			continue;
 
 		if (endpoint->GetSubscriptions()) {





More information about the icinga-checkins mailing list