summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handshake.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-02-25 08:38:44 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-03-01 02:05:51 -0800
commitbf73fd2d8d6805a9a3b947464c65a9847442bba3 (patch)
tree261db5b8f1c4f1f1ec1a8c9323ab222049a265c0 /xlators/mgmt/glusterd/src/glusterd-handshake.c
parent36bd0291118dfee4df9d387eb94681d41a0abcbb (diff)
glusterd: separate out cli specific programs and mgmt specific programs
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2333 (make glusterd more rpc friendly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2333
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 b8218e7f..593add79 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,