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

Method transactRequest

src/remote/client/interface.cpp:7482–7586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7480
7481
7482void Attachment::transactRequest(CheckStatusWrapper* status, ITransaction* apiTra,
7483 unsigned int blr_length, const unsigned char* blr,
7484 unsigned int in_msg_length, const unsigned char* in_msg,
7485 unsigned int out_msg_length, unsigned char* out_msg)
7486{
7487/**************************************
7488 *
7489 * i s c _ t r a n s a c t _ r e q u e s t
7490 *
7491 **************************************
7492 *
7493 * Functional description
7494 * Execute a procedure on remote host.
7495 *
7496 **************************************/
7497 try
7498 {
7499 reset(status);
7500
7501 CHECK_HANDLE(rdb, isc_bad_db_handle);
7502 rem_port* port = rdb->rdb_port;
7503 RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION);
7504
7505 Rtr* transaction = remoteTransaction(apiTra);
7506 CHECK_HANDLE(transaction, isc_bad_trans_handle);
7507
7508 // Validate data length
7509
7510 CHECK_LENGTH(port, blr_length);
7511 CHECK_LENGTH(port, in_msg_length);
7512 CHECK_LENGTH(port, out_msg_length);
7513
7514 Rpr* procedure = port->port_rpr;
7515 if (!procedure) {
7516 procedure = port->port_rpr = FB_NEW Rpr;
7517 }
7518
7519 // Parse the blr describing the messages
7520
7521 delete procedure->rpr_in_msg;
7522 procedure->rpr_in_msg = NULL;
7523 delete procedure->rpr_in_format;
7524 procedure->rpr_in_format = NULL;
7525 delete procedure->rpr_out_msg;
7526 procedure->rpr_out_msg = NULL;
7527 delete procedure->rpr_out_format;
7528 procedure->rpr_out_format = NULL;
7529
7530 RMessage* message = PARSE_messages(blr, blr_length);
7531 while (message)
7532 {
7533 switch (message->msg_number)
7534 {
7535 case 0:
7536 procedure->rpr_in_msg = message;
7537 procedure->rpr_in_format = (rem_fmt*) message->msg_address;
7538 message->msg_address = const_cast<unsigned char*>(in_msg);
7539 message = message->msg_next;

Callers 1

transact_requestMethod · 0.45

Calls 8

CHECK_HANDLEFunction · 0.85
CHECK_LENGTHFunction · 0.85
PARSE_messagesFunction · 0.85
send_packetFunction · 0.85
receive_packetFunction · 0.85
REMOTE_check_responseFunction · 0.85
resetFunction · 0.70
stuffExceptionMethod · 0.45

Tested by

no test coverage detected