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
39103910 DependencyManager::get<AvatarManager>()->clearOtherAvatars();
39113911 }
39123912 }
3913−
3914−void Application::trackIncomingOctreePacket(const QByteArray& packet, const SharedNodePointer& sendingNode, bool wasStatsPacket) {
3913+
3914+void Application::trackIncomingOctreePacket(NLPacket& packet, SharedNodePointer sendingNode, bool wasStatsPacket) {
39153915
39163916 // Attempt to identify the sender from its address.
39173917 if (sendingNode) {
3918− QUuid nodeUUID = sendingNode->getUUID();
3918+ const QUuid& nodeUUID = sendingNode->getUUID();
39193919
39203920 // now that we know the node ID, let's add these stats to the stats for that node...
39213921 _octreeSceneStatsLock.lockForWrite();
@@ -3927,7 +3927,7 @@ void Application::trackIncomingOctreePacket(const QByteArray& packet, const Shar · 5 unmodified lines
39273927 }
39283928 }
39293929
3930−int Application::processOctreeStats(QSharedPointer<NLPacket> packet, SharedNodePointer sendingNode) {
3930+int Application::processOctreeStats(NLPacket& packet, SharedNodePointer sendingNode) {
39313931 // But, also identify the sender, and keep track of the contained jurisdiction root for this server
39323932
39333933 // 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
39413941 _octreeSceneStatsLock.lockForWrite();
39423942 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
39433943 octreeStats = &_octreeServerSceneStats[nodeUUID];
3944− statsMessageLength = octreeStats->unpackFromPacket(*packet);
3944+ statsMessageLength = octreeStats->unpackFromPacket(packet);
39453945 } else {
39463946 OctreeSceneStats temp;
3947− statsMessageLength = temp.unpackFromPacket(*packet);
3947+ statsMessageLength = temp.unpackFromPacket(packet);
39483948 octreeStats = &temp;
39493949 }
39503950 _octreeSceneStatsLock.unlock();