diff options
| author | Pranith K <pranithk@gluster.com> | 2011-03-10 02:20:39 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-10 08:09:58 -0800 | 
| commit | a0aafa365dd355864d24232bd6d7f399ef38f9ef (patch) | |
| tree | 5911492054085849f13f7a8a58983ee599c242db /cli/src/cli.c | |
| parent | 496a04f3b2d46893635f93e5a33032969a826cd2 (diff) | |
cli: gluster profile CLI
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 'cli/src/cli.c')
| -rw-r--r-- | cli/src/cli.c | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c index 00faffe4281..ef88d04201f 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;  }  | 
