summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-handshake.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
-rw-r--r--xlators/protocol/client/src/client-handshake.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 6fdea91..587e256 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -23,6 +23,7 @@
#define CLIENT_REOPEN_MAX_ATTEMPTS 1024
extern rpc_clnt_prog_t clnt3_3_fop_prog;
+extern rpc_clnt_prog_t clnt4_0_fop_prog;
extern rpc_clnt_prog_t clnt_pmap_prog;
int client_set_lk_version_cbk (struct rpc_req *req, struct iovec *iov,
@@ -1487,6 +1488,19 @@ select_server_supported_programs (xlator_t *this, gf_prog_detail *prog)
trav->progname, trav->prognum, trav->progver);
ret = 0;
}
+
+ if ((clnt4_0_fop_prog.prognum == trav->prognum) &&
+ (clnt4_0_fop_prog.progver == trav->progver)) {
+ conf->fops = &clnt4_0_fop_prog;
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ PC_MSG_VERSION_INFO, "Using Program %s,"
+ " Num (%"PRId64"), Version (%"PRId64")",
+ trav->progname, trav->prognum, trav->progver);
+ ret = 0;
+ /* this is latest program, lets use it */
+ goto out;
+ }
+
if (ret) {
gf_msg_trace (this->name, 0,
"%s (%"PRId64") not supported",