History

repairs to octree packet receiving in interface

Stephen Birarda committed 11 years ago

Commit d9904201 parent 264f39f18 files · +179 −218Browse files

Showing the changes to interface/src/Application.cpp (1 of 18 files). Show all

Unified · Split

interface/src/Application.cpp+6−6
@@ -3910,12 +3910,12 @@ void Application::nodeKilled(SharedNodePointer node) { · 3909 unmodified lines
3910 DependencyManager::get<AvatarManager>()->clearOtherAvatars();3910 DependencyManager::get<AvatarManager>()->clearOtherAvatars();
3911 }3911 }
3912}3912}
3913 3913
3914void Application::trackIncomingOctreePacket(const QByteArray& packet, const SharedNodePointer& sendingNode, bool wasStatsPacket) {3914void Application::trackIncomingOctreePacket(NLPacket& packet, SharedNodePointer sendingNode, bool wasStatsPacket) {
3915 3915
3916 // Attempt to identify the sender from its address.3916 // Attempt to identify the sender from its address.
3917 if (sendingNode) {3917 if (sendingNode) {
3918 QUuid nodeUUID = sendingNode->getUUID();3918 const QUuid& nodeUUID = sendingNode->getUUID();
3919 3919
3920 // now that we know the node ID, let's add these stats to the stats for that node...3920 // now that we know the node ID, let's add these stats to the stats for that node...
3921 _octreeSceneStatsLock.lockForWrite();3921 _octreeSceneStatsLock.lockForWrite();
@@ -3927,7 +3927,7 @@ void Application::trackIncomingOctreePacket(const QByteArray& packet, const Shar · 5 unmodified lines
3927 }3927 }
3928}3928}
3929 3929
3930int Application::processOctreeStats(QSharedPointer<NLPacket> packet, SharedNodePointer sendingNode) {3930int Application::processOctreeStats(NLPacket& packet, SharedNodePointer sendingNode) {
3931 // But, also identify the sender, and keep track of the contained jurisdiction root for this server3931 // But, also identify the sender, and keep track of the contained jurisdiction root for this server
3932 3932
3933 // parse the incoming stats datas stick it in a temporary object for now, while we3933 // parse the incoming stats datas stick it in a temporary object for now, while we
@@ -3941,10 +3941,10 @@ int Application::processOctreeStats(QSharedPointer<NLPacket> packet, SharedNodeP · 7 unmodified lines
3941 _octreeSceneStatsLock.lockForWrite();3941 _octreeSceneStatsLock.lockForWrite();
3942 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {3942 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
3943 octreeStats = &_octreeServerSceneStats[nodeUUID];3943 octreeStats = &_octreeServerSceneStats[nodeUUID];
3944 statsMessageLength = octreeStats->unpackFromPacket(*packet);3944 statsMessageLength = octreeStats->unpackFromPacket(packet);
3945 } else {3945 } else {
3946 OctreeSceneStats temp;3946 OctreeSceneStats temp;
3947 statsMessageLength = temp.unpackFromPacket(*packet);3947 statsMessageLength = temp.unpackFromPacket(packet);
3948 octreeStats = &temp;3948 octreeStats = &temp;
3949 }3949 }
3950 _octreeSceneStatsLock.unlock();3950 _octreeSceneStatsLock.unlock();