From 15d56782ae560aa556d6af64896c4c879c6c46e6 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Tue, 16 Nov 2010 08:15:48 +0000 Subject: 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 Signed-off-by: Anand V. Avati BUG: 2078 (Volume Migration is not working) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2078 --- rpc/rpc-lib/src/rpc-clnt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rpc/rpc-lib') 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); -- cgit