From 4877476fa1a591c51f4b3ee76082766f38a33b23 Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Wed, 22 Apr 2009 04:01:06 +0530 Subject: 0-byte write guard guard server_writev from 0-byte writes from client where iobuf will be NULL. This is possible only via libglusterfsclient (not fuse) Signed-off-by: Anand V. Avati --- xlators/protocol/server/src/server-protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/protocol/server/src/server-protocol.c') diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index 9bba95544..78ca63523 100644 --- a/xlators/protocol/server/src/server-protocol.c +++ b/xlators/protocol/server/src/server-protocol.c @@ -4211,7 +4211,8 @@ server_writev (call_frame_t *frame, xlator_t *bound_xl, GF_VALIDATE_OR_GOTO(bound_xl->name, state->fd, fail); - iov.iov_base = iobuf->ptr; + if (iobuf) + iov.iov_base = iobuf->ptr; iov.iov_len = state->size; iobref = iobref_new (); -- cgit