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

Method startAndSend

src/jrd/jrd.cpp:4496–4552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4494
4495
4496void JRequest::startAndSend(CheckStatusWrapper* user_status, ITransaction* tra, int level,
4497 unsigned int msg_type, unsigned int msg_length, const void* msg)
4498{
4499/**************************************
4500 *
4501 * g d s _ $ s t a r t _ a n d _ s e n d
4502 *
4503 **************************************
4504 *
4505 * Functional description
4506 * Get a record from the host program.
4507 *
4508 **************************************/
4509 try
4510 {
4511 JTransaction* const jt = getAttachment()->getTransactionInterface(user_status, tra);
4512 EngineContextHolder tdbb(user_status, this, FB_FUNCTION);
4513
4514 jrd_tra* transaction = jt->getHandle();
4515 validateHandle(tdbb, transaction);
4516 check_database(tdbb);
4517
4518 Request* request = getHandle()->getRequest(tdbb, level);
4519
4520 try
4521 {
4522 TraceBlrExecute trace(tdbb, request);
4523 try
4524 {
4525 JRD_start_and_send(tdbb, request, transaction, msg_type, msg_length, msg);
4526
4527 // Notify Trace API about blr execution
4528 trace.finish(ITracePlugin::RESULT_SUCCESS);
4529 }
4530 catch (const Exception& ex)
4531 {
4532 const ISC_STATUS exc = transliterateException(tdbb, ex, user_status, "JRequest::startAndSend");
4533 const bool no_priv = (exc == isc_login || exc == isc_no_priv);
4534 trace.finish(no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
4535
4536 return;
4537 }
4538 }
4539 catch (const Exception& ex)
4540 {
4541 transliterateException(tdbb, ex, user_status, "JRequest::startAndSend");
4542 return;
4543 }
4544 }
4545 catch (const Exception& ex)
4546 {
4547 ex.stuffException(user_status);
4548 return;
4549 }
4550
4551 successful_completion(user_status);
4552}
4553

Callers

nothing calls this directly

Calls 10

validateHandleFunction · 0.85
check_databaseFunction · 0.85
JRD_start_and_sendFunction · 0.85
transliterateExceptionFunction · 0.85
successful_completionFunction · 0.85
getHandleMethod · 0.45
getRequestMethod · 0.45
finishMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected