From 7691550a5bd281e9d21771b37066d44434e92934 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 24 Jan 2011 22:55:07 +0000 Subject: use rpc_clnt_{new,start} (), instead of rpc_clnt_init(); to prevent a race between getting a CONNECT/DISCONNECT event before registering a notify function Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati BUG: 2314 (notify function registration in CLI) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2314 --- glusterfsd/src/glusterfsd-mgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index bcfd966bf..95ab7b98f 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -521,7 +521,7 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx) if (ret) goto out; - rpc = rpc_clnt_init (&rpc_cfg, options, THIS->ctx, THIS->name); + rpc = rpc_clnt_new (&rpc_cfg, options, THIS->ctx, THIS->name); if (!rpc) { ret = -1; goto out; @@ -537,6 +537,7 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx) if (ret) goto out; + rpc_clnt_start (rpc); out: return ret; } -- cgit