mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-12 20:28:27 +00:00
Expose cluster status in /status JSON response.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user