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

Method cancelSessionProcedure

src/jrd/ProfilerManager.cpp:236–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236IExternalResultSet* ProfilerPackage::cancelSessionProcedure(ThrowStatusExceptionWrapper* /*status*/,
237 IExternalContext* context, const CancelSessionInput::Type* in, void* out)
238{
239 const auto tdbb = JRD_get_thread_data();
240 const auto attachment = tdbb->getAttachment();
241
242 if (!in->attachmentIdNull && AttNumber(in->attachmentId) != attachment->att_attachment_id)
243 {
244 ProfilerIpc ipc(tdbb, *getDefaultMemoryPool(), in->attachmentId);
245 ipc.send(tdbb, ProfilerIpc::Tag::CANCEL_SESSION, in);
246 return nullptr;
247 }
248
249 const auto transaction = tdbb->getTransaction();
250 const auto profilerManager = attachment->getProfilerManager(tdbb);
251
252 profilerManager->cancelSession();
253
254 return nullptr;
255}
256
257IExternalResultSet* ProfilerPackage::finishSessionProcedure(ThrowStatusExceptionWrapper* /*status*/,
258 IExternalContext* context, const FinishSessionInput::Type* in, void* out)

Callers

nothing calls this directly

Calls 7

JRD_get_thread_dataFunction · 0.85
getDefaultMemoryPoolFunction · 0.85
getProfilerManagerMethod · 0.80
cancelSessionMethod · 0.80
getAttachmentMethod · 0.45
sendMethod · 0.45
getTransactionMethod · 0.45

Tested by

no test coverage detected