MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / stopSession

Method stopSession

src/jrd/trace/TraceService.cpp:156–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void TraceSvcJrd::stopSession(ULONG id)
157{
158 m_svc.started();
159
160 ConfigStorage* storage = TraceManager::getStorage();
161 StorageGuard guard(storage);
162
163 TraceSession session(*getDefaultMemoryPool());
164 session.ses_id = id;
165 if (storage->getSession(session, ConfigStorage::AUTH))
166 {
167 if (checkPrivileges(session))
168 {
169 storage->removeSession(id);
170 m_svc.printf(false, "Trace session ID %ld stopped\n", id);
171 }
172 else
173 m_svc.printf(false, "No permissions to stop other user trace session\n");
174
175 return;
176 }
177
178 m_svc.printf(false, "Trace session ID %d not found\n", id);
179}
180
181void TraceSvcJrd::setActive(ULONG id, bool active)
182{

Callers 1

fbtraceFunction · 0.45

Calls 5

getDefaultMemoryPoolFunction · 0.85
getSessionMethod · 0.80
removeSessionMethod · 0.80
startedMethod · 0.45
printfMethod · 0.45

Tested by

no test coverage detected