From d23585307a0e333c9b1ff627df4c7e30b3642201 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Thu, 10 Mar 2011 02:18:22 +0000 Subject: rpc: Changes for handling unix domain sockets avoid race Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1965 (need a cmd to get io-stat details) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1965 --- glusterfsd/src/glusterfsd-mgmt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index a6d8a480076..ef922a72bc4 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -523,14 +523,12 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx) if (ret) goto out; - rpc = rpc_clnt_new (&rpc_cfg, options, THIS->ctx, THIS->name); + rpc = rpc_clnt_new (options, THIS->ctx, THIS->name); if (!rpc) { ret = -1; goto out; } - ctx->mgmt = rpc; - ret = rpc_clnt_register_notify (rpc, mgmt_rpc_notify, THIS); if (ret) goto out; @@ -539,7 +537,10 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx) if (ret) goto out; - rpc_clnt_start (rpc); + ret = rpc_clnt_start (rpc); + if (ret) + goto out; + ctx->mgmt = rpc; out: return ret; } -- cgit