From 56880e88584c3460b0aa98fe2ef9e648443bd8b8 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 7 Jul 2015 15:33:03 -0700 Subject: [PATCH] return fixes for NAK PacketLists --- .../src/octree/OctreeInboundPacketProcessor.cpp | 6 ++---- interface/src/Application.cpp | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp b/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp index 9ede2ca21d..168ebc1629 100644 --- a/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp +++ b/assignment-client/src/octree/OctreeInboundPacketProcessor.cpp @@ -235,11 +235,9 @@ void OctreeInboundPacketProcessor::trackInboundPacket(const QUuid& nodeUUID, uns } int OctreeInboundPacketProcessor::sendNackPackets() { - int packetsSent = 0; - if (_shuttingDown) { qDebug() << "OctreeInboundPacketProcessor::sendNackPackets() while shutting down... ignore"; - return packetsSent; + return 0; } PacketList nackPacketList = PacketList(_myServer->getMyEditNackType(); @@ -284,7 +282,7 @@ int OctreeInboundPacketProcessor::sendNackPackets() { nackPacketList.closeCurrentPacket(); - packetsSent = nackPacketList.getNumPackets(); + int packetsSent = nackPacketList.getNumPackets(); if (packetsSent) { qDebug() << "NACK Sent back to editor/client... destinationNode=" << nodeUUID; diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c41b90cf29..a1f3a62035 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2674,7 +2674,7 @@ int Application::sendNackPackets() { // if there are octree packets from this node that are waiting to be processed, // don't send a NACK since the missing packets may be among those waiting packets. if (_octreeProcessor.hasPacketsToProcessFrom(nodeUUID)) { - return; + return 0; } _octreeSceneStatsLock.lockForRead(); @@ -2682,7 +2682,7 @@ int Application::sendNackPackets() { // retreive octree scene stats of this node if (_octreeServerSceneStats.find(nodeUUID) == _octreeServerSceneStats.end()) { _octreeSceneStatsLock.unlock(); - return; + return 0; } // get sequence number stats of node, prune its missing set, and make a copy of the missing set