From: Ronnie Sahlberg Date: Sun, 26 Jun 2011 07:30:00 +0000 (+1000) Subject: in allocate pdu, if context is udp, dont allocate space for a record marker X-Git-Tag: upstream/1.9.6^2~382 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a19924120d7297f60a4995e555e21ff9f92ca248;p=deb_libnfs.git in allocate pdu, if context is udp, dont allocate space for a record marker --- 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;