1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

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:
Doug Rabson 2008-03-30 09:36:17 +00:00
parent 7ea7cc4bab
commit ecc03b80f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177737

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);