mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Fix update executions. Fix code indentation
This commit is contained in:
parent
a33560548c
commit
6a5deaf7d4
@ -952,8 +952,8 @@ Value ClusterEvents::UpdateExecutionsAPIHandler(const MessageOrigin::Ptr& origin
|
|||||||
Endpoint::Ptr endpoint = origin->FromClient->GetEndpoint();
|
Endpoint::Ptr endpoint = origin->FromClient->GetEndpoint();
|
||||||
if (!endpoint) {
|
if (!endpoint) {
|
||||||
Log(LogNotice, "ClusterEvents")
|
Log(LogNotice, "ClusterEvents")
|
||||||
<< "Discarding 'update executions API handler' message from '" << origin->FromClient->GetIdentity()
|
<< "Discarding 'update executions API handler' message from '" << origin->FromClient->GetIdentity()
|
||||||
<< "': Invalid endpoint origin (client not allowed).";
|
<< "': Invalid endpoint origin (client not allowed).";
|
||||||
|
|
||||||
return Empty;
|
return Empty;
|
||||||
}
|
}
|
||||||
@ -976,19 +976,14 @@ Value ClusterEvents::UpdateExecutionsAPIHandler(const MessageOrigin::Ptr& origin
|
|||||||
|
|
||||||
if (origin->FromZone && !origin->FromZone->CanAccessObject(checkable)) {
|
if (origin->FromZone && !origin->FromZone->CanAccessObject(checkable)) {
|
||||||
Log(LogNotice, "ClusterEvents")
|
Log(LogNotice, "ClusterEvents")
|
||||||
<< "Discarding 'update executions API handler' message for checkable '" << checkable->GetName()
|
<< "Discarding 'update executions API handler' message for checkable '" << checkable->GetName()
|
||||||
<< "' from '" << origin->FromClient->GetIdentity() << "': Unauthorized access.";
|
<< "' from '" << origin->FromClient->GetIdentity() << "': Unauthorized access.";
|
||||||
return Empty;
|
return Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!params->Contains("executions")) {
|
Dictionary::Ptr executions = checkable->GetExecutions();
|
||||||
Log(LogNotice, "ClusterEvents")
|
Dictionary::Ptr newExecutions = params->Get("executions");
|
||||||
<< "Discarding 'update executions API handler' message for checkable '" << checkable->GetName()
|
newExecutions->CopyTo(executions);
|
||||||
<< "' from '" << origin->FromClient->GetIdentity() << "': missing executions.";
|
|
||||||
return Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
Dictionary::Ptr executions = params->Get("executions");
|
|
||||||
checkable->SetExecutions(executions);
|
checkable->SetExecutions(executions);
|
||||||
|
|
||||||
return Empty;
|
return Empty;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user