summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-11-16 08:15:48 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-16 06:35:05 -0800
commit15d56782ae560aa556d6af64896c4c879c6c46e6 (patch)
tree8b86bcfabc71b92e7e015600f80b6732257f9ab4
parentb985dce6c4415a9d67fefabdbf2e5fe287e1dc62 (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
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c6
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 a53ac4da95b..15b8ff3309a 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);