Skip to content

Commit

Permalink
Always update object authority, even w/o API feature
Browse files Browse the repository at this point in the history
Regression from #7062

Thanks @nilmerg :)
  • Loading branch information
Michael Friedrich committed Apr 3, 2019
1 parent e909302 commit 5c3a9b7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/remote/apilistener-authority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ using namespace icinga;

void ApiListener::UpdateObjectAuthority()
{
ApiListener::Ptr instance = ApiListener::GetInstance();

if (!instance)
return;

Log(LogNotice, "ApiListener")
<< "Updating object authority for objects at endpoint '" << instance->GetIdentity() << "'.";
/* Always run this, even if there is no 'api' feature enabled. */
if (auto listener = ApiListener::GetInstance()) {
Log(LogNotice, "ApiListener")
<< "Updating object authority for objects at endpoint '" << listener->GetIdentity() << "'.";
} else {
Log(LogNotice, "ApiListener")
<< "Updating object authority for local objects.";
}

Zone::Ptr my_zone = Zone::GetLocalZone();

Expand Down

0 comments on commit 5c3a9b7

Please sign in to comment.