summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-03-14 13:49:49 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-03-14 13:49:49 -0700
commit9d7b7c72b2dd769853bea3423321539ab198829e (patch)
treedb1a038d5cda0a023b63b449a2b0c53ce9b96428
parentd7a6357393f25748e4256d6ccf1321d7532d02b9 (diff)
parent95bfc29c92f1c689f181142d226ad642f86cee10 (diff)
downloadinfinitytier-9d7b7c72b2dd769853bea3423321539ab198829e.tar.gz
infinitytier-9d7b7c72b2dd769853bea3423321539ab198829e.zip
Merge branch 'dev' into edge
-rw-r--r--controller/RabbitMQ.cpp4
-rw-r--r--node/Path.hpp6
-rw-r--r--node/Peer.cpp2
-rw-r--r--node/Peer.hpp2
4 files changed, 6 insertions, 8 deletions
diff --git a/controller/RabbitMQ.cpp b/controller/RabbitMQ.cpp
index f5a5c1d6..0b8cec73 100644
--- a/controller/RabbitMQ.cpp
+++ b/controller/RabbitMQ.cpp
@@ -1,5 +1,7 @@
#include "RabbitMQ.hpp"
+#ifdef ZT_CONTROLLER_USE_LIBPQ
+
#include <amqp.h>
#include <amqp_tcp_socket.h>
#include <stdexcept>
@@ -92,3 +94,5 @@ std::string RabbitMQ::consume()
}
}
+
+#endif // ZT_CONTROLLER_USE_LIBPQ
diff --git a/node/Path.hpp b/node/Path.hpp
index 6acba172..a9e7d84d 100644
--- a/node/Path.hpp
+++ b/node/Path.hpp
@@ -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];
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 9f8c5bbc..aecbd3a0 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -78,9 +78,7 @@ Peer::Peer(const RuntimeEnvironment *renv,const Identity &myIdentity,const Ident
Utils::getSecureRandom(&_freeRandomByte, 1);
if (!myIdentity.agree(peerIdentity,_key,ZT_PEER_SECRET_KEY_LENGTH))
throw ZT_EXCEPTION_INVALID_ARGUMENT;
-#if ZT_PROTO_VERSION >= 10
_pathChoiceHist = new RingBuffer<int>(ZT_MULTIPATH_PROPORTION_WIN_SZ);
-#endif
}
void Peer::received(
diff --git a/node/Peer.hpp b/node/Peer.hpp
index 99d3fac2..ae8f1e78 100644
--- a/node/Peer.hpp
+++ b/node/Peer.hpp
@@ -62,9 +62,7 @@ private:
public:
~Peer() {
Utils::burn(_key,sizeof(_key));
-#if ZT_PROTO_VERSION >= 10
delete _pathChoiceHist;
-#endif
_pathChoiceHist = NULL;
}