summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2011-06-18 09:49:40 -0400
committerSteve Dickson <steved@redhat.com>2011-06-18 10:03:14 -0400
commit9fc6599bf3e028a40e5d3997692ee83a60caf192 (patch)
treea9f478b023a604e31d007e91b1fd44cb375f339a
parentdd0a9650a9979f209795f2855766efc91e9f6f79 (diff)
downloadti-rpc-9fc6599bf3e028a40e5d3997692ee83a60caf192.tar.gz
Do not skip records with nonblocking connections
With non-blocking connections, do not skip records when receiving the streams since entire value messages can be ignored which in cause the entire stream to become out of sync. For example, two mounts simultaneously send two unmaps commands. The first one is read, then the second thrown away due to skipping the record. Skipping this record will cause XDR error later in processing of the stream. Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--src/svc_vc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/svc_vc.c b/src/svc_vc.c
index aaaf2d7..87406f1 100644
--- a/src/svc_vc.c
+++ b/src/svc_vc.c
@@ -610,7 +610,11 @@ svc_vc_recv(xprt, msg)
}
xdrs->x_op = XDR_DECODE;
- (void)xdrrec_skiprecord(xdrs);
+ /*
+ * No need skip records with nonblocking connections
+ */
+ if (cd->nonblock == FALSE)
+ (void)xdrrec_skiprecord(xdrs);
if (xdr_callmsg(xdrs, msg)) {
cd->x_id = msg->rm_xid;
return (TRUE);