diff options
Diffstat (limited to 'xlators/protocol')
| -rw-r--r-- | xlators/protocol/client/src/client-protocol.c | 10 | ||||
| -rw-r--r-- | xlators/protocol/server/src/server-protocol.c | 3 | 
2 files changed, 13 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c index 7a2326afdd9..a0a0f06fd8d 100644 --- a/xlators/protocol/client/src/client-protocol.c +++ b/xlators/protocol/client/src/client-protocol.c @@ -6254,6 +6254,8 @@ client_setvolume_cbk (call_frame_t *frame,  	int32_t                 op_ret   = -1;  	int32_t                 op_errno = EINVAL;  	int32_t                 dict_len = 0; +        transport_t            *peer_trans = NULL; +        uint64_t                peer_trans_int = 0;  	trans = frame->local; frame->local = NULL; @@ -6321,14 +6323,22 @@ client_setvolume_cbk (call_frame_t *frame,  		ctx = get_global_ctx_ptr ();  		if (process_uuid && !strcmp (ctx->process_uuid,process_uuid)) { +                        ret = dict_get_uint64 (reply, "transport-ptr", +                                               &peer_trans_int); + +                        peer_trans = (void *) (long) (peer_trans_int);  			gf_log (this->name, GF_LOG_WARNING,   				"attaching to the local volume '%s'",  				remote_subvol); +                        transport_setpeer (trans, peer_trans); +  			/* TODO: */ +                        /*  			conf->child = xlator_search_by_name (this,   							     remote_subvol); +                        */  		}                  gf_log (trans->xl->name, GF_LOG_NORMAL, diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index 92cdda2bf84..7fc379efb77 100644 --- a/xlators/protocol/server/src/server-protocol.c +++ b/xlators/protocol/server/src/server-protocol.c @@ -7085,6 +7085,9 @@ mop_setvolume (call_frame_t *frame, xlator_t *bound_xl,  	ret = dict_set_str (reply, "process-uuid",   			    xl->ctx->process_uuid); +	ret = dict_set_uint64 (reply, "transport-ptr", +                               ((uint64_t) (long) trans)); +  fail:  	dict_len = dict_serialized_length (reply);  	if (dict_len < 0) {  | 
