summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client-handshake.c13
-rw-r--r--xlators/protocol/client/src/client.c31
2 files changed, 30 insertions, 14 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 101b62eecd7..19cd0f5d008 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -353,13 +353,14 @@ client_notify_parents_child_up (xlator_t *this)
/* send notify to 'ctx->master' if it exists */
xlator_notify (this->ctx->master, GF_EVENT_CHILD_UP,
this->graph);
- }
+ } else {
- parent = this->parents;
- while (parent) {
- xlator_notify (parent->xlator, GF_EVENT_CHILD_UP,
- this);
- parent = parent->next;
+ parent = this->parents;
+ while (parent) {
+ xlator_notify (parent->xlator, GF_EVENT_CHILD_UP,
+ this);
+ parent = parent->next;
+ }
}
return 0;
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index e64d8135fff..23d84ba0d84 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -888,20 +888,24 @@ out:
static gf_boolean_t
client_set_remote_options (char *value, xlator_t *this)
{
- clnt_conf_t *conf = NULL;
- char *dup_value = NULL;
- char *host = NULL;
- char *subvol = NULL;
- char *host_dup = NULL;
- char *subvol_dup = NULL;
- char *tmp = NULL;
- gf_boolean_t ret = _gf_false;
+ clnt_conf_t *conf = NULL;
+ char *dup_value = NULL;
+ char *host = NULL;
+ char *subvol = NULL;
+ char *host_dup = NULL;
+ char *subvol_dup = NULL;
+ char *remote_port_str = NULL;
+ char *tmp = NULL;
+ int remote_port = 0;
+ gf_boolean_t ret = _gf_false;
conf = this->private;
dup_value = gf_strdup (value);
host = strtok_r (dup_value, ":", &tmp);
subvol = strtok_r (NULL, ":", &tmp);
+ remote_port_str = strtok_r (NULL, ":", &tmp);
+
if (!subvol) {
gf_log (this->name, GF_LOG_WARNING,
"proper value not passed as subvolume");
@@ -936,6 +940,17 @@ client_set_remote_options (char *value, xlator_t *this)
goto out;
}
+ remote_port = atoi (remote_port_str);
+ GF_ASSERT (remote_port);
+
+ ret = dict_set_int32 (this->options, "remote-port",
+ remote_port);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "failed to set remote-port to %d", remote_port);
+ goto out;
+ }
+
ret = _gf_true;
out:
if (dup_value)