diff options
| author | Vijay Bellur <vijay@gluster.com> | 2010-08-12 03:26:39 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-12 02:38:56 -0700 | 
| commit | e98ebc1da4f49fba2bcaaf3212b00058e615cf29 (patch) | |
| tree | 5dde47fdd3651961d2471a7801f4aa474453b486 /xlators/mgmt/glusterd/src/glusterd3_1-mops.c | |
| parent | a6a2e3a86c0d4c0873e822a38769677df2050f11 (diff) | |
glusterd: Fixes for detach
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1215 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1215
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd3_1-mops.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd3_1-mops.c | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c index 59933e8ac..8c84b8d48 100644 --- a/xlators/mgmt/glusterd/src/glusterd3_1-mops.c +++ b/xlators/mgmt/glusterd/src/glusterd3_1-mops.c @@ -241,7 +241,7 @@ glusterd3_1_friend_remove_cbk (struct rpc_req * req, struct iovec *iov,          if (-1 == req->rpc_status) {                  rsp.op_ret   = -1;                  rsp.op_errno = EINVAL; -                goto respond; +                goto inject;          }          ret = gd_xdr_to_mgmt_friend_rsp (*iov, &rsp); @@ -263,6 +263,7 @@ glusterd3_1_friend_remove_cbk (struct rpc_req * req, struct iovec *iov,          if (op_ret)                  goto respond; +inject:          ret = glusterd_friend_find (rsp.uuid, rsp.hostname, &peerinfo);          if (ret) { @@ -289,11 +290,12 @@ glusterd3_1_friend_remove_cbk (struct rpc_req * req, struct iovec *iov,          glusterd_friend_sm ();          glusterd_op_sm (); -        return ret; +        op_ret = 0; +  respond: -        ret = glusterd_xfer_cli_probe_resp (ctx->req, op_ret, op_errno, -                                            ctx->hostname, ctx->port); +        ret = glusterd_xfer_cli_deprobe_resp (ctx->req, op_ret, op_errno, +                                              ctx->hostname);          if (!ret) {                  glusterd_friend_sm ();                  glusterd_op_sm (); @@ -699,6 +701,8 @@ glusterd3_1_friend_remove (call_frame_t *frame, xlator_t *this,                                         GD_MGMT_FRIEND_REMOVE,                                         NULL, gd_xdr_from_mgmt_friend_req,                                         this, glusterd3_1_friend_remove_cbk); +        //Override ret +        ret = 0;  out:          gf_log ("glusterd", GF_LOG_DEBUG, "Returning %d", ret);  | 
