summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhou Zhengping <johnzzpcrystal@gmail.com>2017-03-29 11:40:43 +0800
committerRaghavendra G <rgowdapp@redhat.com>2017-04-02 00:34:22 -0400
commit64fc3505c426d1ff9fc16f065a81556e96ed93b7 (patch)
tree084be8e6c5e5e0e0367da20a1c8820ac2a7c8007
parent1c92f83ec041176ad7c42ef83525cda7d3eda3c5 (diff)
protocol: corect parameter state->size in server3_3_writev
Change-Id: I1a3d558670e4320fe8508b5ab97deff9aacca5c7 BUG: 1436936 Signed-off-by: Zhou Zhengping <johnzzpcrystal@gmail.com> Reviewed-on: https://review.gluster.org/16962 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
-rw-r--r--xlators/protocol/server/src/server-rpc-fops.c5
1 files changed, 4 insertions, 1 deletions
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,