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.c2
-rw-r--r--xlators/protocol/client/src/client.c25
-rw-r--r--xlators/protocol/client/src/client.h2
3 files changed, 9 insertions, 20 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 9289859d1e7..3b170b8d186 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -130,7 +130,7 @@ client_notify_parents_child_up (xlator_t *this)
int ret = 0;
conf = this->private;
- ret = client_notify_dispatch (this, GF_EVENT_CHILD_UP, NULL);
+ ret = client_notify_dispatch_uniq (this, GF_EVENT_CHILD_UP, NULL);
if (ret)
gf_msg (this->name, GF_LOG_INFO, 0,
PC_MSG_CHILD_UP_NOTIFY_FAILED, "notify of CHILD_UP "
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 4ce210bf364..dc3b75d4b2c 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -50,7 +50,7 @@ out:
return 0;
}
-static int
+int
client_notify_dispatch_uniq (xlator_t *this, int32_t event, void *data, ...)
{
clnt_conf_t *conf = this->private;
@@ -1981,27 +1981,14 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
{
conf->connected = 1;
// connect happened, send 'get_supported_versions' mop
- ret = dict_get_str (this->options, "disable-handshake",
- &handshake);
gf_msg_debug (this->name, 0, "got RPC_CLNT_CONNECT");
- if ((ret < 0) || (strcasecmp (handshake, "on"))) {
- ret = client_handshake (this, rpc);
- if (ret)
- gf_msg (this->name, GF_LOG_WARNING, 0,
- PC_MSG_HANDSHAKE_RETURN, "handshake "
- "msg returned %d", ret);
- } else {
- //conf->rpc->connected = 1;
- ret = client_notify_dispatch_uniq (this,
- GF_EVENT_CHILD_UP,
- NULL);
- if (ret)
- gf_msg (this->name, GF_LOG_INFO, 0,
- PC_MSG_CHILD_UP_NOTIFY_FAILED,
- "CHILD_UP notify failed");
- }
+ ret = client_handshake (this, rpc);
+ if (ret)
+ gf_msg (this->name, GF_LOG_WARNING, 0,
+ PC_MSG_HANDSHAKE_RETURN, "handshake "
+ "msg returned %d", ret);
/* Cancel grace timer if set */
pthread_mutex_lock (&conf->lock);
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h
index 55f95257a6d..5a012440eef 100644
--- a/xlators/protocol/client/src/client.h
+++ b/xlators/protocol/client/src/client.h
@@ -270,4 +270,6 @@ gf_boolean_t
__is_fd_reopen_in_progress (clnt_fd_ctx_t *fdctx);
int
client_notify_dispatch (xlator_t *this, int32_t event, void *data, ...);
+int
+client_notify_dispatch_uniq (xlator_t *this, int32_t event, void *data, ...);
#endif /* !_CLIENT_H */