summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-helpers.c
diff options
context:
space:
mode:
authorRyan Ding <ryan.ding@open-fs.com>2016-08-24 00:41:13 +0800
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-09-01 08:20:41 -0700
commitffc7d44095ba23c761a034fb713cae05df135f2b (patch)
treede5e217af8c90073827195bf2e75bfb2d22469c9 /xlators/protocol/server/src/server-helpers.c
parentf2ce05561c29c48640b72d0e813dd93b0282bd5e (diff)
protocol/server: readlink rsp xdr will fail while readlink got an error
set gfs3_readlink_rsp.path with an empty string while error happen, to make xdr_gfs3_readlink_rsp happy. otherwise the original errno will be lost, and return an rpc internal errno instead. Change-Id: I36655b66df8b9f164e5bd21eb17244722c2f5a52 BUG: 1370172 Signed-off-by: Ryan Ding <ryan.ding@open-fs.com> Reviewed-on: http://review.gluster.org/15312 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/protocol/server/src/server-helpers.c')
-rw-r--r--xlators/protocol/server/src/server-helpers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index 39fbcbc6763..474db926629 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -2321,6 +2321,8 @@ server_populate_compound_response (xlator_t *this, gfs3_compound_rsp *rsp,
rsp_args->op_ret = this_args_cbk->op_ret;
rsp_args->op_errno = gf_errno_to_error
(this_args_cbk->op_errno);
+ if (!rsp_args->path)
+ rsp_args->path = "";
break;
}
case GF_FOP_MKNOD: