From 44c5d4a2bfd6abd395e842a8a210328da7e671de Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 13 Jul 2015 15:29:41 -0700 Subject: [PATCH] Couple fixes SharedNodePointer > Node& --- assignment-client/src/audio/AudioMixerClientData.cpp | 3 --- libraries/networking/src/NodeList.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/assignment-client/src/audio/AudioMixerClientData.cpp b/assignment-client/src/audio/AudioMixerClientData.cpp index e933982bb0..1e0bc6d9b2 100644 --- a/assignment-client/src/audio/AudioMixerClientData.cpp +++ b/assignment-client/src/audio/AudioMixerClientData.cpp @@ -159,10 +159,7 @@ void AudioMixerClientData::sendAudioStreamStatsPackets(const SharedNodePointer& int numStreamStatsRemaining = _audioStreams.size(); QHash::ConstIterator audioStreamsIterator = _audioStreams.constBegin(); - NLPacketList statsPacketList(PacketType::AudioStreamStats); - while (numStreamStatsRemaining > 0) { - auto statsPacket = NLPacket::create(PacketType::AudioStreamStats); // pack the append flag in this packet diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 3e6418c7f6..20206c88ce 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -184,7 +184,7 @@ void NodeList::processNodeData(const HifiSockAddr& senderSockAddr, const QByteAr if (matchingNode) { matchingNode->setLastHeardMicrostamp(usecTimestampNow()); auto replyPacket = constructPingReplyPacket(packet); - sendPacket(std::move(replyPacket), matchingNode, senderSockAddr); + sendPacket(std::move(replyPacket), *matchingNode, senderSockAddr); // If we don't have a symmetric socket for this node and this socket doesn't match // what we have for public and local then set it as the symmetric. @@ -611,14 +611,14 @@ void NodeList::pingPunchForInactiveNode(const SharedNodePointer& node) { // send the ping packet to the local and public sockets for this node auto localPingPacket = constructPingPacket(PingType::Local); - sendPacket(std::move(localPingPacket), node, node->getLocalSocket()); + sendPacket(std::move(localPingPacket), *node, node->getLocalSocket()); auto publicPingPacket = constructPingPacket(PingType::Public); - sendPacket(std::move(publicPingPacket), node, node->getPublicSocket()); + sendPacket(std::move(publicPingPacket), *node, node->getPublicSocket()); if (!node->getSymmetricSocket().isNull()) { auto symmetricPingPacket = constructPingPacket(PingType::Symmetric); - sendPacket(std::move(symmetricPingPacket), node, node->getSymmetricSocket()); + sendPacket(std::move(symmetricPingPacket), *node, node->getSymmetricSocket()); } node->incrementConnectionAttempts();