mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
return fixes for NAK PacketLists
This commit is contained in:
parent
45b549398d
commit
56880e8858
2 changed files with 4 additions and 6 deletions
|
@ -235,11 +235,9 @@ void OctreeInboundPacketProcessor::trackInboundPacket(const QUuid& nodeUUID, uns
|
||||||
}
|
}
|
||||||
|
|
||||||
int OctreeInboundPacketProcessor::sendNackPackets() {
|
int OctreeInboundPacketProcessor::sendNackPackets() {
|
||||||
int packetsSent = 0;
|
|
||||||
|
|
||||||
if (_shuttingDown) {
|
if (_shuttingDown) {
|
||||||
qDebug() << "OctreeInboundPacketProcessor::sendNackPackets() while shutting down... ignore";
|
qDebug() << "OctreeInboundPacketProcessor::sendNackPackets() while shutting down... ignore";
|
||||||
return packetsSent;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketList nackPacketList = PacketList(_myServer->getMyEditNackType();
|
PacketList nackPacketList = PacketList(_myServer->getMyEditNackType();
|
||||||
|
@ -284,7 +282,7 @@ int OctreeInboundPacketProcessor::sendNackPackets() {
|
||||||
|
|
||||||
nackPacketList.closeCurrentPacket();
|
nackPacketList.closeCurrentPacket();
|
||||||
|
|
||||||
packetsSent = nackPacketList.getNumPackets();
|
int packetsSent = nackPacketList.getNumPackets();
|
||||||
|
|
||||||
if (packetsSent) {
|
if (packetsSent) {
|
||||||
qDebug() << "NACK Sent back to editor/client... destinationNode=" << nodeUUID;
|
qDebug() << "NACK Sent back to editor/client... destinationNode=" << nodeUUID;
|
||||||
|
|
|
@ -2674,7 +2674,7 @@ int Application::sendNackPackets() {
|
||||||
// if there are octree packets from this node that are waiting to be processed,
|
// 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.
|
// don't send a NACK since the missing packets may be among those waiting packets.
|
||||||
if (_octreeProcessor.hasPacketsToProcessFrom(nodeUUID)) {
|
if (_octreeProcessor.hasPacketsToProcessFrom(nodeUUID)) {
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_octreeSceneStatsLock.lockForRead();
|
_octreeSceneStatsLock.lockForRead();
|
||||||
|
@ -2682,7 +2682,7 @@ int Application::sendNackPackets() {
|
||||||
// retreive octree scene stats of this node
|
// retreive octree scene stats of this node
|
||||||
if (_octreeServerSceneStats.find(nodeUUID) == _octreeServerSceneStats.end()) {
|
if (_octreeServerSceneStats.find(nodeUUID) == _octreeServerSceneStats.end()) {
|
||||||
_octreeSceneStatsLock.unlock();
|
_octreeSceneStatsLock.unlock();
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get sequence number stats of node, prune its missing set, and make a copy of the missing set
|
// get sequence number stats of node, prune its missing set, and make a copy of the missing set
|
||||||
|
|
Loading…
Reference in a new issue