Revert "#ifdef'd out multipath/QoS statistics buffers allocations for ZT_PROTOCOL_VERSION<10"

This reverts commit 270debb3fc.
This commit is contained in:
Grant Limberg 2019-03-11 09:44:40 -07:00
parent 993d850f69
commit d4c0349de9
3 changed files with 2 additions and 8 deletions

View file

@ -161,7 +161,6 @@ public:
~Path()
{
#if ZT_PROTO_VERSION >= 10
delete _throughputSamples;
delete _latencySamples;
delete _packetValiditySamples;
@ -170,7 +169,6 @@ public:
_latencySamples = NULL;
_packetValiditySamples = NULL;
_throughputDisturbanceSamples = NULL;
#endif
}
/**
@ -653,14 +651,12 @@ 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:
@ -706,6 +702,8 @@ private:
float _lastComputedThroughputDistCoeff;
unsigned char _lastAllocation;
// cached human-readable strings for tracing purposes
char _ifname[16];
char _addrString[256];