summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/svc_vc.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2008-03-30 09:36:17 +0000
committerdfr <dfr@FreeBSD.org>2008-03-30 09:36:17 +0000
commit256e041f3b5d05f1d3ed6061912ba9f2734cfa0c (patch)
tree4a77f99dc90c51863075266ef06525a775bf52a7 /lib/libc/rpc/svc_vc.c
parent6eacca7a0604581cc5603356fc594eac85e92add (diff)
downloadFreeBSD-src-256e041f3b5d05f1d3ed6061912ba9f2734cfa0c.zip
FreeBSD-src-256e041f3b5d05f1d3ed6061912ba9f2734cfa0c.tar.gz
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
Diffstat (limited to 'lib/libc/rpc/svc_vc.c')
-rw-r--r--lib/libc/rpc/svc_vc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/rpc/svc_vc.c b/lib/libc/rpc/svc_vc.c
index 6fcbb21..6370aad 100644
--- a/lib/libc/rpc/svc_vc.c
+++ b/lib/libc/rpc/svc_vc.c
@@ -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);
OpenPOWER on IntegriCloud