Don't call xdrrec_skiprecord in the non-blocking case. If

__xdrrec_getrec has returned TRUE, then we have a complete request in
the buffer - calling xdrrec_skiprecord is not necessary. In particular,
if there is another record already buffered on the stream,
xdrrec_skiprecord will discard both this request and the next
one, causing the call to xdr_callmsg to fail and the stream to be
closed.

Sponsored by:	Isilon Systems
This commit is contained in:
dfr 2008-03-30 09:36:17 +00:00
parent 6eacca7a06
commit 256e041f3b

View File

@ -604,10 +604,11 @@ svc_vc_recv(xprt, msg)
if (cd->nonblock) {
if (!__xdrrec_getrec(xdrs, &cd->strm_stat, TRUE))
return FALSE;
} else {
(void)xdrrec_skiprecord(xdrs);
}
xdrs->x_op = XDR_DECODE;
(void)xdrrec_skiprecord(xdrs);
if (xdr_callmsg(xdrs, msg)) {
cd->x_id = msg->rm_xid;
return (TRUE);