| 1569 | |
| 1570 | |
| 1571 | static 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 | |
| 1609 | static bool_t xdr_packed_message( RemoteXdr* xdrs, RMessage* message, const rem_fmt* format) |
no test coverage detected