2019-01-27 22:39:44 -08:00
|
|
|
diff --git a/node/RingBuffer.hpp b/node/RingBuffer.hpp
|
|
|
|
|
index dab81b9e..0d90152b 100644
|
|
|
|
|
--- a/node/RingBuffer.hpp
|
|
|
|
|
+++ b/node/RingBuffer.hpp
|
|
|
|
|
@@ -72,6 +72,11 @@ public:
|
|
|
|
|
memset(buf, 0, sizeof(T) * size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+ ~RingBuffer()
|
|
|
|
|
+ {
|
|
|
|
|
+ delete [] buf;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
/**
|
|
|
|
|
* @return A pointer to the underlying buffer
|
|
|
|
|
*/
|
|
|
|
|
diff --git a/node/Switch.cpp b/node/Switch.cpp
|
2019-02-14 19:03:49 -08:00
|
|
|
index 74c22d33..3e4f53b4 100644
|
2019-01-27 22:39:44 -08:00
|
|
|
--- a/node/Switch.cpp
|
|
|
|
|
+++ b/node/Switch.cpp
|
2019-02-14 19:03:49 -08:00
|
|
|
@@ -425,16 +425,16 @@ void Switch::onLocalEthernet(void *tPtr,const SharedPtr<Network> &network,const
|
|
|
|
|
from.appendTo(outp);
|
|
|
|
|
outp.append((uint16_t)etherType);
|
|
|
|
|
outp.append(data,len);
|
|
|
|
|
- if (!network->config().disableCompression())
|
|
|
|
|
- outp.compress();
|
|
|
|
|
+ //if (!network->config().disableCompression())
|
|
|
|
|
+ // outp.compress();
|
|
|
|
|
aqm_enqueue(tPtr,network,outp,true,qosBucket);
|
|
|
|
|
} else {
|
|
|
|
|
Packet outp(toZT,RR->identity.address(),Packet::VERB_FRAME);
|
|
|
|
|
outp.append(network->id());
|
|
|
|
|
outp.append((uint16_t)etherType);
|
|
|
|
|
outp.append(data,len);
|
|
|
|
|
- if (!network->config().disableCompression())
|
|
|
|
|
- outp.compress();
|
|
|
|
|
+ //if (!network->config().disableCompression())
|
|
|
|
|
+ // outp.compress();
|
|
|
|
|
aqm_enqueue(tPtr,network,outp,true,qosBucket);
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-27 22:39:44 -08:00
|
|
|
@@ -532,7 +532,7 @@ void Switch::aqm_enqueue(void *tPtr, const SharedPtr<Network> &network, Packet &
|
|
|
|
|
TXQueueEntry *txEntry = new TXQueueEntry(dest,RR->node->now(),packet,encrypt);
|
|
|
|
|
|
|
|
|
|
ManagedQueue *selectedQueue = nullptr;
|
|
|
|
|
- for (int i=0; i<ZT_QOS_NUM_BUCKETS; i++) {
|
|
|
|
|
+ for (size_t i=0; i<ZT_QOS_NUM_BUCKETS; i++) {
|
|
|
|
|
if (i < nqcb->oldQueues.size()) { // search old queues first (I think this is best since old would imply most recent usage of the queue)
|
|
|
|
|
if (nqcb->oldQueues[i]->id == qosBucket) {
|
|
|
|
|
selectedQueue = nqcb->oldQueues[i];
|
|
|
|
|
@@ -568,7 +568,7 @@ void Switch::aqm_enqueue(void *tPtr, const SharedPtr<Network> &network, Packet &
|
|
|
|
|
{
|
|
|
|
|
// DEBUG_INFO("too many enqueued packets (%d), finding packet to drop", nqcb->_currEnqueuedPackets);
|
|
|
|
|
int maxQueueLength = 0;
|
|
|
|
|
- for (int i=0; i<ZT_QOS_NUM_BUCKETS; i++) {
|
|
|
|
|
+ for (size_t i=0; i<ZT_QOS_NUM_BUCKETS; i++) {
|
|
|
|
|
if (i < nqcb->oldQueues.size()) {
|
|
|
|
|
if (nqcb->oldQueues[i]->byteLength > maxQueueLength) {
|
|
|
|
|
maxQueueLength = nqcb->oldQueues[i]->byteLength;
|