From f3c0281d9b4654888a5525b443f1e6090d874725 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 22 Jul 2011 15:23:32 +0530 Subject: 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 for pointing it out Change-Id: Iebbd651b7563265800f41922367ca133fbbf4fc3 BUG: 3207 Reviewed-on: http://review.gluster.com/77 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- glusterfsd/src/glusterfsd-mgmt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'glusterfsd') 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; } -- cgit