From b041de831a6d6a68c138cb97b0ad7549712d9516 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 17 Jun 2019 15:50:05 -0700 Subject: More stack->heap --- node/OutboundMulticast.cpp | 4 ++-- node/OutboundMulticast.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'node') diff --git a/node/OutboundMulticast.cpp b/node/OutboundMulticast.cpp index dc513e84..5b5b726b 100644 --- a/node/OutboundMulticast.cpp +++ b/node/OutboundMulticast.cpp @@ -91,8 +91,8 @@ void OutboundMulticast::sendOnly(const RuntimeEnvironment *RR,void *tPtr,const A _packet.setDestination(toAddr2); RR->node->expectReplyTo(_packet.packetId()); - Packet tmp(_packet); // make a copy of packet so as not to garble the original -- GitHub issue #461 - RR->sw->send(tPtr,tmp,true); + _tmp = _packet; + RR->sw->send(tPtr,_tmp,true); } } diff --git a/node/OutboundMulticast.hpp b/node/OutboundMulticast.hpp index c549eacf..42063995 100644 --- a/node/OutboundMulticast.hpp +++ b/node/OutboundMulticast.hpp @@ -161,7 +161,7 @@ private: unsigned int _limit; unsigned int _frameLen; unsigned int _etherType; - Packet _packet; + Packet _packet,_tmp; std::vector
_alreadySentTo; uint8_t _frameData[ZT_MAX_MTU]; }; -- cgit v1.2.3