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

Method ping

src/remote/client/interface.cpp:7659–7693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7657
7658
7659void Attachment::ping(CheckStatusWrapper* status)
7660{
7661/**************************************
7662 *
7663 * p i n g
7664 *
7665 **************************************
7666 *
7667 * Functional description
7668 * Check the attachment handle for persistent errors.
7669 *
7670 **************************************/
7671 try
7672 {
7673 reset(status);
7674
7675 CHECK_HANDLE(rdb, isc_bad_db_handle);
7676 rem_port* port = rdb->rdb_port;
7677 RefMutexGuard portGuard(*port->port_sync, FB_FUNCTION);
7678
7679 // Make sure protocol support action
7680
7681 if (rdb->rdb_port->port_protocol < PROTOCOL_VERSION13)
7682 unsupported();
7683
7684 PACKET* packet = &rdb->rdb_packet;
7685 packet->p_operation = op_ping;
7686
7687 send_and_receive(status, rdb, packet);
7688 }
7689 catch (const Exception& ex)
7690 {
7691 ex.stuffException(status);
7692 }
7693}
7694
7695static Rvnt* add_event( rem_port* port)
7696{

Callers 1

ping_connectionFunction · 0.45

Calls 5

CHECK_HANDLEFunction · 0.85
unsupportedFunction · 0.85
send_and_receiveFunction · 0.85
resetFunction · 0.70
stuffExceptionMethod · 0.45

Tested by

no test coverage detected