MCPcopy Create free account
hub / github.com/Icinga/icinga2 / OnAllConfigLoaded

Method OnAllConfigLoaded

lib/remote/endpoint.cpp:22–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20boost::signals2::signal<void(const Endpoint::Ptr&, const JsonRpcConnection::Ptr&)> Endpoint::OnDisconnected;
21
22void Endpoint::OnAllConfigLoaded()
23{
24 ObjectImpl<Endpoint>::OnAllConfigLoaded();
25
26 if (!m_Zone)
27 BOOST_THROW_EXCEPTION(ScriptError("Endpoint '" + GetName() +
28 "' does not belong to a zone.", GetDebugInfo()));
29
30 if (GetName().GetLength() > 64) {
31 std::ostringstream oss;
32 ShowCodeLocation(oss, GetDebugInfo(), false);
33
34 Log(LogWarning, "Endpoint")
35 << "Endpoint name is too long (length: " << GetName().GetLength()
36 << ", max: 64) to be used as CN in TLS certificates. Consider using a shorter name.\n" << oss.str();
37 }
38}
39
40void Endpoint::SetCachedZone(const Zone::Ptr& zone)
41{

Callers

nothing calls this directly

Calls 3

ScriptErrorClass · 0.85
LogClass · 0.85
GetLengthMethod · 0.45

Tested by

no test coverage detected