diff options
author | Amar Tumballi <amar@gluster.com> | 2010-10-06 04:44:14 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-06 22:17:13 -0700 |
commit | 96155f065e229f6123cc90b9ca37df9cbd7598c7 (patch) | |
tree | 5b622d5e7444d7fcd0430d980f2eac667bbd6c89 /rpc | |
parent | 7c7cf68b798ac6ff1d4727c288cdcba15589e456 (diff) |
transport: set 'trans->options' before calling 'trans->init()'
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
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
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 39256d24..c69237d5 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) { |