diff options
author | Pranith K <pranithk@gluster.com> | 2011-03-10 02:18:22 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-10 08:09:30 -0800 |
commit | d23585307a0e333c9b1ff627df4c7e30b3642201 (patch) | |
tree | 0e900775fff91686474051cf55375966e7028eec /glusterfsd/src | |
parent | 45fd0d904d11f07f8b523af2d1357f081e3c5dc1 (diff) |
rpc: Changes for handling unix domain sockets avoid race
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1965 (need a cmd to get io-stat details)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1965
Diffstat (limited to 'glusterfsd/src')
-rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; } |