From a19924120d7297f60a4995e555e21ff9f92ca248 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 26 Jun 2011 17:30:00 +1000 Subject: [PATCH] in allocate pdu, if context is udp, dont allocate space for a record marker --- lib/pdu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pdu.c b/lib/pdu.c index fb03061..a12d30b 100644 --- a/lib/pdu.c +++ b/lib/pdu.c @@ -48,7 +48,9 @@ struct rpc_pdu *rpc_allocate_pdu(struct rpc_context *rpc, int program, int versi pdu->xdr_decode_bufsize = xdr_decode_bufsize; xdrmem_create(&pdu->xdr, rpc->encodebuf, rpc->encodebuflen, XDR_ENCODE); - xdr_setpos(&pdu->xdr, 4); /* skip past the record marker */ + if (rpc->is_udp == 0) { + xdr_setpos(&pdu->xdr, 4); /* skip past the record marker */ + } bzero(&msg, sizeof(struct rpc_msg)); msg.rm_xid = pdu->xid; -- 2.34.1