summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handshake.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handshake.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handshake.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c
index b8218e7fd0f..593add795af 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handshake.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c
@@ -37,6 +37,7 @@
#include "rpcsvc.h"
extern struct rpc_clnt_program glusterd3_1_mgmt_prog;
+extern struct rpc_clnt_program gd_clnt_mgmt_prog;
typedef ssize_t (*gfs_serialize_t) (struct iovec outmsg, void *data);
@@ -288,6 +289,17 @@ glusterd_set_clnt_mgmt_program (glusterd_peerinfo_t *peerinfo,
while (trav) {
/* Select 'programs' */
+ if ((gd_clnt_mgmt_prog.prognum == trav->prognum) &&
+ (gd_clnt_mgmt_prog.progver == trav->progver)) {
+ peerinfo->mgmt = &gd_clnt_mgmt_prog;
+ gf_log ("", GF_LOG_INFO,
+ "Using Program %s, Num (%"PRId64"), "
+ "Version (%"PRId64")",
+ trav->progname, trav->prognum, trav->progver);
+ ret = 0;
+ /* Break here, as this gets higher priority */
+ break;
+ }
if ((glusterd3_1_mgmt_prog.prognum == trav->prognum) &&
(glusterd3_1_mgmt_prog.progver == trav->progver)) {
peerinfo->mgmt = &glusterd3_1_mgmt_prog;
@@ -296,7 +308,6 @@ glusterd_set_clnt_mgmt_program (glusterd_peerinfo_t *peerinfo,
"Version (%"PRId64")",
trav->progname, trav->prognum, trav->progver);
ret = 0;
- break;
}
if (ret) {
gf_log ("", GF_LOG_TRACE,