diff options
author | Amar Tumballi <amar@gluster.com> | 2011-11-13 00:18:32 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-11-16 01:45:24 -0800 |
commit | a29ab15988f46fbe98151c37676185de970fb187 (patch) | |
tree | 7e768d2fdcfca5e1f1a26b524c2acfb700067d15 /xlators/mgmt/glusterd/src/glusterd-handshake.c | |
parent | 7a97478dd1a343fcc5d9d4eab963882191a3de69 (diff) |
glusterd/cli: rpc cleanup
no more backward compatibility between glusterd <-> glusterd
Change-Id: Ibfcca1c7e315a90b2639c4cba8da19b11875051a
BUG: 3158
Reviewed-on: http://review.gluster.com/610
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handshake.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 8331a91f669..269c6015a17 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -36,8 +36,8 @@ #include "protocol-common.h" #include "rpcsvc.h" -extern struct rpc_clnt_program glusterd3_1_mgmt_prog; -extern struct rpc_clnt_program gd_clnt_mgmt_prog; +extern struct rpc_clnt_program gd_peer_prog; +extern struct rpc_clnt_program gd_mgmt_prog; typedef ssize_t (*gfs_serialize_t) (struct iovec outmsg, void *data); @@ -279,16 +279,14 @@ 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; + if ((gd_mgmt_prog.prognum == trav->prognum) && + (gd_mgmt_prog.progver == trav->progver)) { + peerinfo->mgmt = &gd_mgmt_prog; 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; + if ((gd_peer_prog.prognum == trav->prognum) && + (gd_peer_prog.progver == trav->progver)) { + peerinfo->peer = &gd_peer_prog; ret = 0; } if (ret) { @@ -300,12 +298,18 @@ glusterd_set_clnt_mgmt_program (glusterd_peerinfo_t *peerinfo, trav = trav->next; } - if (!ret && peerinfo->mgmt) { + if (peerinfo->mgmt) { gf_log ("", GF_LOG_INFO, "Using Program %s, Num (%d), Version (%d)", peerinfo->mgmt->progname, peerinfo->mgmt->prognum, peerinfo->mgmt->progver); } + if (peerinfo->peer) { + gf_log ("", GF_LOG_INFO, + "Using Program %s, Num (%d), Version (%d)", + peerinfo->peer->progname, peerinfo->peer->prognum, + peerinfo->peer->progver); + } out: return ret; |