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

Function xdr_sql_message

src/remote/protocol.cpp:2007–2059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2005
2006
2007static bool_t xdr_sql_message( RemoteXdr* xdrs, SLONG statement_id)
2008{
2009/**************************************
2010 *
2011 * x d r _ s q l _ m e s s a g e
2012 *
2013 **************************************
2014 *
2015 * Functional description
2016 * Map a formatted sql message.
2017 *
2018 **************************************/
2019 Rsr* statement;
2020
2021 if (xdrs->x_op == XDR_FREE)
2022 return TRUE;
2023
2024 rem_port* port = xdrs->x_public;
2025
2026 if (statement_id >= 0)
2027 {
2028 if (static_cast<ULONG>(statement_id) >= port->port_objects.getCount())
2029 return FALSE;
2030
2031 try
2032 {
2033 statement = port->port_objects[statement_id];
2034 }
2035 catch (const status_exception&)
2036 {
2037 return FALSE;
2038 }
2039 }
2040 else
2041 {
2042 statement = port->port_statement;
2043 }
2044
2045 if (!statement)
2046 return FALSE;
2047
2048 RMessage* message = statement->rsr_buffer;
2049 if (!message)
2050 return FALSE;
2051
2052 statement->rsr_buffer = message->msg_next;
2053 if (!message->msg_address)
2054 message->msg_address = message->msg_buffer;
2055
2056 return (port->port_protocol >= PROTOCOL_VERSION13) ?
2057 xdr_packed_message(xdrs, message, statement->rsr_format) :
2058 xdr_message(xdrs, message, statement->rsr_format);
2059}
2060
2061
2062static bool_t xdr_status_vector(RemoteXdr* xdrs, DynamicStatusVector*& vector)

Callers 1

xdr_protocolFunction · 0.85

Calls 3

xdr_packed_messageFunction · 0.85
xdr_messageFunction · 0.85
getCountMethod · 0.45

Tested by

no test coverage detected