From 96155f065e229f6123cc90b9ca37df9cbd7598c7 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 6 Oct 2010 04:44:14 +0000 Subject: transport: set 'trans->options' before calling 'trans->init()' Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875 --- rpc/rpc-lib/src/rpc-transport.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 39256d2422f..c69237d58c4 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -946,6 +946,11 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name) } } + trans->options = options; + + pthread_mutex_init (&trans->lock, NULL); + trans->xl = THIS; + ret = trans->init (trans); if (ret != 0) { gf_log ("rpc-transport", GF_LOG_ERROR, @@ -953,10 +958,6 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name) goto fail; } - trans->options = options; - - pthread_mutex_init (&trans->lock, NULL); - trans->xl = THIS; return_trans = trans; if (name) { -- cgit