mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Fixed message subscriptions.
This commit is contained in:
parent
9e85d1efe4
commit
bd3ceb8edd
@ -42,8 +42,10 @@ int AuthenticationComponent::NewEndpointHandler(const NewEndpointEventArgs& neea
|
||||
neea.Endpoint->AddAllowedMethodSinkPrefix("auth::");
|
||||
neea.Endpoint->AddAllowedMethodSourcePrefix("auth::");
|
||||
|
||||
neea.Endpoint->RegisterMethodSink("auth::SetIdentity");
|
||||
|
||||
JsonRpcRequest request;
|
||||
request.SetMethod("message::SetIdentity");
|
||||
request.SetMethod("auth::SetIdentity");
|
||||
|
||||
IdentityMessage params;
|
||||
params.SetIdentity("keks");
|
||||
|
@ -73,12 +73,15 @@ int SubscriptionComponent::NewEndpointHandler(const NewEndpointEventArgs& neea)
|
||||
if (neea.Endpoint->IsLocal())
|
||||
return 0;
|
||||
|
||||
EndpointManager::Ptr mgr = GetIcingaApplication()->GetEndpointManager();
|
||||
mgr->ForeachEndpoint(bind(&SubscriptionComponent::SyncSubscriptions, this, neea.Endpoint, _1));
|
||||
|
||||
neea.Endpoint->AddAllowedMethodSinkPrefix("message::");
|
||||
neea.Endpoint->AddAllowedMethodSourcePrefix("message::");
|
||||
|
||||
neea.Endpoint->RegisterMethodSink("message::Subscribe");
|
||||
neea.Endpoint->RegisterMethodSink("message::Provide");
|
||||
|
||||
EndpointManager::Ptr mgr = GetIcingaApplication()->GetEndpointManager();
|
||||
mgr->ForeachEndpoint(bind(&SubscriptionComponent::SyncSubscriptions, this, neea.Endpoint, _1));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user