From a0aafa365dd355864d24232bd6d7f399ef38f9ef Mon Sep 17 00:00:00 2001 From: Pranith K Date: Thu, 10 Mar 2011 02:20:39 +0000 Subject: cli: gluster profile CLI 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 --- cli/src/cli.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cli/src/cli.c') diff --git a/cli/src/cli.c b/cli/src/cli.c index 00faffe4..ef88d042 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -491,7 +491,6 @@ struct rpc_clnt * cli_rpc_init (struct cli_state *state) { struct rpc_clnt *rpc = NULL; - struct rpc_clnt_config rpc_cfg = {0,}; dict_t *options = NULL; int ret = -1; int port = CLI_GLUSTERD_PORT; @@ -511,9 +510,6 @@ cli_rpc_init (struct cli_state *state) if (state->remote_port) port = state->remote_port; - rpc_cfg.remote_host = state->remote_host; - rpc_cfg.remote_port = port; - ret = dict_set_int32 (options, "remote-port", port); if (ret) goto out; @@ -535,6 +531,11 @@ cli_rpc_init (struct cli_state *state) rpc_clnt_start (rpc); out: + if (ret) { + if (rpc) + rpc_clnt_unref (rpc); + rpc = NULL; + } return rpc; } -- cgit