diff options
| -rw-r--r-- | cli/src/cli.c | 13 | ||||
| -rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 3 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 5 | 
3 files changed, 16 insertions, 5 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c index 075b7f43d21..7a0d1ab389e 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -522,11 +522,18 @@ cli_rpc_init (struct cli_state *state)          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 = rpc_clnt_register_notify (rpc, cli_rpc_notify, this); +        if (!rpc) +                goto out; + +        ret = rpc_clnt_register_notify (rpc, cli_rpc_notify, this); +        if (ret) { +                gf_log ("cli", GF_LOG_ERROR, "failed to register notify"); +                goto out;          } + +        rpc_clnt_start (rpc);  out:          return rpc;  } diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index bcfd966bfd2..95ab7b98fcb 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;  } diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 42b0efcd539..9aca4bd4b55 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -2505,7 +2505,7 @@ glusterd_friend_rpc_create (struct rpc_clnt **rpc,          if (ret)                  goto out; -        new_rpc = rpc_clnt_init (&rpc_cfg, options, this->ctx, this->name); +        new_rpc = rpc_clnt_new (&rpc_cfg, options, this->ctx, this->name);          if (!new_rpc) {                  gf_log ("glusterd", GF_LOG_ERROR, @@ -2517,6 +2517,9 @@ glusterd_friend_rpc_create (struct rpc_clnt **rpc,          ret = rpc_clnt_register_notify (new_rpc, glusterd_rpc_notify,                                          peerctx);          *rpc = new_rpc; + +        rpc_clnt_start (new_rpc); +  out:          if (ret) {                  if (new_rpc) {  | 
