summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-08-12 03:26:39 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-12 02:38:56 -0700
commite98ebc1da4f49fba2bcaaf3212b00058e615cf29 (patch)
tree5dde47fdd3651961d2471a7801f4aa474453b486 /xlators/mgmt/glusterd/src/glusterd-handler.c
parenta6a2e3a86c0d4c0873e822a38769677df2050f11 (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/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index df3fd6f071c..3161849e49e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -1653,10 +1653,11 @@ glusterd_deprobe_begin (rpcsvc_request_t *req, const char *hoststr, int port)
}
ret = glusterd_friend_sm_new_event
- (GD_FRIEND_EVENT_INIT_REMOVE_FRIEND, &event);
+ (GD_FRIEND_EVENT_INIT_REMOVE_FRIEND, &event);
if (ret) {
- gf_log ("glusterd", GF_LOG_ERROR, "Unable to get new event");
+ gf_log ("glusterd", GF_LOG_ERROR,
+ "Unable to get new event");
return ret;
}
@@ -1670,9 +1671,10 @@ glusterd_deprobe_begin (rpcsvc_request_t *req, const char *hoststr, int port)
ctx->port = port;
ctx->req = req;
- event->peerinfo = peerinfo;
event->ctx = ctx;
+ event->peerinfo = peerinfo;
+
ret = glusterd_friend_sm_inject_event (event);
if (ret) {
@@ -1763,6 +1765,26 @@ glusterd_xfer_cli_probe_resp (rpcsvc_request_t *req, int32_t op_ret,
return ret;
}
+int
+glusterd_xfer_cli_deprobe_resp (rpcsvc_request_t *req, int32_t op_ret,
+ int32_t op_errno, char *hostname)
+{
+ gf1_cli_deprobe_rsp rsp = {0, };
+ int32_t ret = -1;
+
+ GF_ASSERT (req);
+
+ rsp.op_ret = op_ret;
+ rsp.op_errno = op_errno;
+ rsp.hostname = hostname;
+
+ ret = glusterd_submit_reply (req, &rsp, NULL, 0, NULL,
+ gf_xdr_serialize_cli_deprobe_rsp);
+
+ gf_log ("glusterd", GF_LOG_NORMAL, "Responded to CLI, ret: %d",ret);
+
+ return ret;
+}
int32_t
glusterd_op_txn_begin ()
{