From 0484b5768da303998549e8153d08899e58edab68 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 21 Sep 2010 02:02:48 +0000 Subject: cli, mgmt/glusterd: send errno in case of Peer reject Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1653 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1653 --- xlators/mgmt/glusterd/src/glusterd-sm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-sm.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c index 025fee7755a..c5e1800cd82 100644 --- a/xlators/mgmt/glusterd/src/glusterd-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-sm.c @@ -352,6 +352,7 @@ glusterd_ac_handle_friend_add_req (glusterd_friend_sm_event_t *event, void *ctx) glusterd_friend_sm_event_type_t event_type = GD_FRIEND_EVENT_NONE; int status = 0; int32_t op_ret = -1; + int32_t op_errno = 0; char remote_hostname[UNIX_PATH_MAX + 1] = {0,}; GF_ASSERT (ctx); @@ -372,6 +373,7 @@ glusterd_ac_handle_friend_add_req (glusterd_friend_sm_event_t *event, void *ctx) } else { event_type = GD_FRIEND_EVENT_LOCAL_RJT; + op_errno = GF_PROBE_VOLUME_CONFLICT; op_ret = -1; } @@ -406,7 +408,7 @@ glusterd_ac_handle_friend_add_req (glusterd_friend_sm_event_t *event, void *ctx) glusterd_friend_sm_inject_event (new_event); ret = glusterd_xfer_friend_add_resp (ev_ctx->req, ev_ctx->hostname, - ev_ctx->port, op_ret); + ev_ctx->port, op_ret, op_errno); out: gf_log ("", GF_LOG_DEBUG, "Returning with %d", ret); -- cgit