diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-26 13:06:10 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-26 13:06:10 -0700 |
commit | debed1ac2dce5822df234ce92bf4692ff1a081db (patch) | |
tree | cc36950c43cca4e9619a0eea7231abb9ec7310b9 /node | |
parent | 5ff7733f84302bbd0ce0a578b3040122d1140f0f (diff) | |
download | infinitytier-debed1ac2dce5822df234ce92bf4692ff1a081db.tar.gz infinitytier-debed1ac2dce5822df234ce92bf4692ff1a081db.zip |
Expose cluster status in /status JSON response.
Diffstat (limited to 'node')
-rw-r--r-- | node/Cluster.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Cluster.cpp b/node/Cluster.cpp index 47794214..9d25593a 100644 --- a/node/Cluster.cpp +++ b/node/Cluster.cpp @@ -647,7 +647,7 @@ void Cluster::status(ZT_ClusterStatus &status) const status.myId = _id; - ms[_id] = &(status.member[status.clusterSize++]); + ms[_id] = &(status.members[status.clusterSize++]); ms[_id]->id = _id; ms[_id]->alive = 1; ms[_id]->x = _x; @@ -665,7 +665,7 @@ void Cluster::status(ZT_ClusterStatus &status) const for(std::vector<uint16_t>::const_iterator mid(_memberIds.begin());mid!=_memberIds.end();++mid) { if (status.clusterSize >= ZT_CLUSTER_MAX_MEMBERS) // sanity check break; - ZT_ClusterMemberStatus *s = ms[*mid] = &(status.member[status.clusterSize++]); + ZT_ClusterMemberStatus *s = ms[*mid] = &(status.members[status.clusterSize++]); _Member &m = _members[*mid]; Mutex::Lock ml(m.lock); |