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

Method reconnectTransaction

src/remote/client/interface.cpp:6511–6553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6509
6510
6511ITransaction* Attachment::reconnectTransaction(CheckStatusWrapper* status,
6512 unsigned int length, const unsigned char* id)
6513{
6514/**************************************
6515 *
6516 * g d s _ r e c o n n e c t
6517 *
6518 **************************************
6519 *
6520 * Functional description
6521 *
6522 **************************************/
6523 try
6524 {
6525 reset(status);
6526
6527 CHECK_HANDLE(rdb, isc_bad_db_handle);
6528 rem_port* port = rdb->rdb_port;
6529 RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION);
6530
6531 // Validate data length
6532
6533 CHECK_LENGTH(port, length);
6534
6535 PACKET* packet = &rdb->rdb_packet;
6536 packet->p_operation = op_reconnect;
6537 P_STTR* trans = &packet->p_sttr;
6538 trans->p_sttr_database = rdb->rdb_id;
6539 trans->p_sttr_tpb.cstr_length = length;
6540 trans->p_sttr_tpb.cstr_address = id;
6541
6542 send_and_receive(status, rdb, packet);
6543
6544 ITransaction* t = FB_NEW Transaction(make_transaction(rdb, packet->p_resp.p_resp_object), this);
6545 t->addRef();
6546 return t;
6547 }
6548 catch (const Exception& ex)
6549 {
6550 ex.stuffException(status);
6551 }
6552 return NULL;
6553}
6554
6555
6556void Request::freeClientData(CheckStatusWrapper* status, bool force)

Callers 1

start_transactionMethod · 0.45

Calls 8

CHECK_HANDLEFunction · 0.85
CHECK_LENGTHFunction · 0.85
send_and_receiveFunction · 0.85
resetFunction · 0.70
TransactionClass · 0.70
make_transactionFunction · 0.70
addRefMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected