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

Function GetOrCreateScriptFrame

lib/remote/consolehandler.cpp:60–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static std::shared_ptr<ApiScriptFrame> GetOrCreateScriptFrame(const String& session) {
61 std::unique_lock<std::mutex> lock(l_ApiScriptMutex);
62 auto& frame = l_ApiScriptFrames[session];
63
64 // If no session was found, create a new one
65 if (!frame) {
66 frame = std::make_shared<ApiScriptFrame>();
67 }
68
69 return frame;
70}
71
72bool ConsoleHandler::HandleRequest(
73 const WaitGroup::Ptr&,

Callers 2

ExecuteScriptHelperMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected