void AuthenticationComponent::Stop(void)
{
+ IcingaApplication::Ptr app = GetIcingaApplication();
+ if (app) {
+ EndpointManager::Ptr mgr = app->GetEndpointManager();
+ mgr->UnregisterEndpoint(m_AuthenticationEndpoint);
+ }
}
int AuthenticationComponent::NewEndpointHandler(const NewEndpointEventArgs& neea)
{
- if (neea.Endpoint->IsLocal())
+ if (neea.Endpoint->IsLocal() || neea.Endpoint->HasIdentity())
return 0;
JsonRpcRequest request;
request.SetParams(params);
neea.Endpoint->ProcessRequest(m_AuthenticationEndpoint, request);
+
+ return 0;
}
int AuthenticationComponent::IdentityMessageHandler(const NewRequestEventArgs& nrea)
void SubscriptionComponent::Stop(void)
{
- EndpointManager::Ptr mgr = GetIcingaApplication()->GetEndpointManager();
- mgr->UnregisterEndpoint(m_SubscriptionEndpoint);
+ IcingaApplication::Ptr app = GetIcingaApplication();
+
+ if (app) {
+ EndpointManager::Ptr mgr = app->GetEndpointManager();
+ mgr->UnregisterEndpoint(m_SubscriptionEndpoint);
+ }
}
int SubscriptionComponent::SyncSubscription(Endpoint::Ptr target, string type, const NewMethodEventArgs& nmea)