diff options
author | Anand Avati <avati@gluster.com> | 2010-11-16 08:15:48 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-11-16 06:35:05 -0800 |
commit | 15d56782ae560aa556d6af64896c4c879c6c46e6 (patch) | |
tree | 8b86bcfabc71b92e7e015600f80b6732257f9ab4 /rpc/rpc-lib/src | |
parent | b985dce6c4415a9d67fefabdbf2e5fe287e1dc62 (diff) |
rpc-clnt: move rpc_clnt_reconnect() call to rpc_clnt_init
Previously rpc_clnt_reconnect() was called inside rpc_clnt_connection_init
which in turn was called from rpc_clnt_init. This change makes
rpc_clnt_connection_init re-usable for the next patch
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2078 (Volume Migration is not working)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2078
Diffstat (limited to 'rpc/rpc-lib/src')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index a53ac4da9..15b8ff330 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -959,8 +959,6 @@ rpc_clnt_connection_init (struct rpc_clnt *clnt, glusterfs_ctx_t *ctx, goto out; } - rpc_clnt_reconnect (conn->trans); - ret = 0; out: @@ -974,6 +972,7 @@ rpc_clnt_init (struct rpc_clnt_config *config, dict_t *options, { int ret = -1; struct rpc_clnt *rpc = NULL; + struct rpc_clnt_connection *conn = NULL; rpc = GF_CALLOC (1, sizeof (*rpc), gf_common_mt_rpcclnt_t); if (!rpc) { @@ -1015,6 +1014,9 @@ rpc_clnt_init (struct rpc_clnt_config *config, dict_t *options, goto out; } + conn = &rpc->conn; + rpc_clnt_reconnect (conn->trans); + rpc = rpc_clnt_ref (rpc); INIT_LIST_HEAD (&rpc->programs); |