From 64fc3505c426d1ff9fc16f065a81556e96ed93b7 Mon Sep 17 00:00:00 2001 From: Zhou Zhengping Date: Wed, 29 Mar 2017 11:40:43 +0800 Subject: protocol: corect parameter state->size in server3_3_writev Change-Id: I1a3d558670e4320fe8508b5ab97deff9aacca5c7 BUG: 1436936 Signed-off-by: Zhou Zhengping Reviewed-on: https://review.gluster.org/16962 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- xlators/protocol/server/src/server-rpc-fops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/protocol/server/src/server-rpc-fops.c') diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 54081625a5c..0ba4ffa6f94 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -4218,10 +4218,13 @@ server3_3_writev (rpcsvc_request_t *req) = req->msg[i]; } + len = 0; for (i = 0; i < state->payload_count; i++) { - state->size += state->payload_vector[i].iov_len; + len += state->payload_vector[i].iov_len; } + GF_ASSERT (state->size == len); + GF_PROTOCOL_DICT_UNSERIALIZE (frame->root->client->bound_xl, state->xdata, args.xdata.xdata_val, -- cgit