summaryrefslogtreecommitdiff
path: root/node/Path.hpp
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2019-03-04 16:27:52 -0800
committerGrant Limberg <grant.limberg@zerotier.com>2019-03-04 16:31:36 -0800
commit801401a6e7022fa44c129f6626d944722d1ec6be (patch)
tree3771b94d80abd1307b965e537d7cfa0f80841ef9 /node/Path.hpp
parentde1fc43cc58ce6a02c6eeef7791328c44189aa7c (diff)
parent270debb3fc39c3f1f6a3f6fbc2c5fb6183182c8f (diff)
downloadinfinitytier-801401a6e7022fa44c129f6626d944722d1ec6be.tar.gz
infinitytier-801401a6e7022fa44c129f6626d944722d1ec6be.zip
Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev
Diffstat (limited to 'node/Path.hpp')
-rw-r--r--node/Path.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/node/Path.hpp b/node/Path.hpp
index a9e7d84d..6acba172 100644
--- a/node/Path.hpp
+++ b/node/Path.hpp
@@ -161,6 +161,7 @@ public:
~Path()
{
+#if ZT_PROTO_VERSION >= 10
delete _throughputSamples;
delete _latencySamples;
delete _packetValiditySamples;
@@ -169,6 +170,7 @@ public:
_latencySamples = NULL;
_packetValiditySamples = NULL;
_throughputDisturbanceSamples = NULL;
+#endif
}
/**
@@ -651,12 +653,14 @@ public:
* Initialize statistical buffers
*/
inline void prepareBuffers() {
+#if ZT_PROTO_VERSION >= 10
_throughputSamples = new RingBuffer<uint64_t>(ZT_PATH_QUALITY_METRIC_WIN_SZ);
_latencySamples = new RingBuffer<uint32_t>(ZT_PATH_QUALITY_METRIC_WIN_SZ);
_packetValiditySamples = new RingBuffer<bool>(ZT_PATH_QUALITY_METRIC_WIN_SZ);
_throughputDisturbanceSamples = new RingBuffer<float>(ZT_PATH_QUALITY_METRIC_WIN_SZ);
memset(_ifname, 0, 16);
memset(_addrString, 0, sizeof(_addrString));
+#endif
}
private:
@@ -702,8 +706,6 @@ private:
float _lastComputedThroughputDistCoeff;
unsigned char _lastAllocation;
-
-
// cached human-readable strings for tracing purposes
char _ifname[16];
char _addrString[256];