From 0d9f33dc4f14b7339d1893e79772a8e49b4821eb Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 13 Nov 2015 12:14:28 -0800 Subject: Fix: (1) Windows stack overflow due to buffer too large in peer deserialize, (2) clean up some other stuff seen during debugging and reduce the sizes of some buffers due to Windows small stack size, (3) remove a redundant try/catch. --- node/Cluster.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'node/Cluster.cpp') diff --git a/node/Cluster.cpp b/node/Cluster.cpp index af9ab854..fa9a1611 100644 --- a/node/Cluster.cpp +++ b/node/Cluster.cpp @@ -628,7 +628,7 @@ void Cluster::doPeriodicTasks() } alive.append((uint64_t)now); alive.append((uint64_t)0); // TODO: compute and send load average - alive.append((uint64_t)RR->topology->countActive()); + alive.append((uint64_t)RR->topology->countActive(now)); alive.append((uint64_t)0); // unused/reserved flags alive.append((uint8_t)_zeroTierPhysicalEndpoints.size()); for(std::vector::const_iterator pe(_zeroTierPhysicalEndpoints.begin());pe!=_zeroTierPhysicalEndpoints.end();++pe) @@ -769,7 +769,7 @@ void Cluster::status(ZT_ClusterStatus &status) const s->y = _y; s->z = _z; s->load = 0; // TODO - s->peers = RR->topology->countActive(); + s->peers = RR->topology->countActive(now); for(std::vector::const_iterator ep(_zeroTierPhysicalEndpoints.begin());ep!=_zeroTierPhysicalEndpoints.end();++ep) { if (s->numZeroTierPhysicalEndpoints >= ZT_CLUSTER_MAX_ZT_PHYSICAL_ADDRESSES) // sanity check break; -- cgit v1.2.3