summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-07-22 15:23:32 +0530
committerAnand Avati <avati@gluster.com>2011-07-28 04:16:14 -0700
commitf3c0281d9b4654888a5525b443f1e6090d874725 (patch)
tree2ea1024c87778840906ff1838fc9916f617c43b7 /glusterfsd/src
parentff5fddcf54805464c1033ee4665835784e260831 (diff)
glusterfsd-mgmt: initialize ctx->mgmt before calling rpc_clnt_start()
this is required because if 'CONNECT' event comes before the clnt_start() function ends, we may loose the event if it is not initialized. Thanks to Jeff Darcy <jdarcy@redhat.com> for pointing it out Change-Id: Iebbd651b7563265800f41922367ca133fbbf4fc3 BUG: 3207 Reviewed-on: http://review.gluster.com/77 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'glusterfsd/src')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index c9ceb7c48b8..dea7d56b11c 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -891,11 +891,11 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx)
goto out;
}
- ret = rpc_clnt_start (rpc);
- if (ret)
- goto out;
-
+ /* This value should be set before doing the 'rpc_clnt_start()' as
+ the notify function uses this variable */
ctx->mgmt = rpc;
+
+ ret = rpc_clnt_start (rpc);
out:
return ret;
}