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

Function xdr_message

src/remote/protocol.cpp:1571–1606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1569
1570
1571static bool_t xdr_message( RemoteXdr* xdrs, RMessage* message, const rem_fmt* format)
1572{
1573/**************************************
1574 *
1575 * x d r _ m e s s a g e
1576 *
1577 **************************************
1578 *
1579 * Functional description
1580 * Map a formatted message.
1581 *
1582 **************************************/
1583 if (xdrs->x_op == XDR_FREE)
1584 return TRUE;
1585
1586 rem_port* port = xdrs->x_public;
1587
1588 if (!message || !format)
1589 return FALSE;
1590
1591 // If we are running a symmetric version of the protocol, just slop
1592 // the bits and don't sweat the translations
1593
1594 if (port->port_flags & PORT_symmetric)
1595 return xdr_opaque(xdrs, reinterpret_cast<SCHAR*>(message->msg_address), format->fmt_length);
1596
1597 const dsc* desc = format->fmt_desc.begin();
1598 for (const dsc* const end = format->fmt_desc.end(); desc < end; ++desc)
1599 {
1600 if (!xdr_datum(xdrs, desc, message->msg_address))
1601 return FALSE;
1602 }
1603
1604 DEBUG_PRINTSIZE(xdrs, op_void);
1605 return TRUE;
1606}
1607
1608
1609static bool_t xdr_packed_message( RemoteXdr* xdrs, RMessage* message, const rem_fmt* format)

Callers 3

xdr_requestFunction · 0.85
xdr_sql_messageFunction · 0.85
xdr_trrq_messageFunction · 0.85

Calls 5

xdr_opaqueFunction · 0.85
xdr_datumFunction · 0.85
DEBUG_PRINTSIZEFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected