Showing the changes to interface/src/Application.cpp (1 of 25 files). Show all
Unified · Split
| @@ -154,7 +154,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 153 unmodified lines | ||
| 154 | 154 | // call Menu getInstance static method to set up the menu |
| 155 | 155 | _window->setMenuBar(Menu::getInstance()); |
| 156 | 156 | |
| 157 | − qDebug("[VERSION] Build sequence: %i", BUILD_VERSION); | |
| 157 | + qDebug("[VERSION] Build sequence: %i\n", BUILD_VERSION); | |
| 158 | 158 | |
| 159 | 159 | unsigned int listenPort = 0; // bind to an ephemeral port by default |
| 160 | 160 | const char** constArgv = const_cast<const char**>(argv); |
| @@ -1252,12 +1252,10 @@ void Application::sendPingPackets() { · 1091 unmodified lines | ||
| 1252 | 1252 | const char nodesToPing[] = {NODE_TYPE_VOXEL_SERVER, NODE_TYPE_PARTICLE_SERVER, |
| 1253 | 1253 | NODE_TYPE_AUDIO_MIXER, NODE_TYPE_AVATAR_MIXER}; |
| 1254 | 1254 | |
| 1255 | − uint64_t currentTime = usecTimestampNow(); | |
| 1256 | − unsigned char pingPacket[numBytesForPacketHeader((unsigned char*) &PACKET_TYPE_PING) + sizeof(currentTime)]; | |
| 1257 | − int numHeaderBytes = populateTypeAndVersion(pingPacket, PACKET_TYPE_PING); | |
| 1258 | − | |
| 1259 | − memcpy(pingPacket + numHeaderBytes, ¤tTime, sizeof(currentTime)); | |
| 1260 | − getInstance()->controlledBroadcastToNodes(pingPacket, sizeof(pingPacket), | |
| 1255 | + unsigned char pingPacket[MAX_PACKET_SIZE]; | |
| 1256 | + int length = NodeList::getInstance()->fillPingPacket(pingPacket); | |
| 1257 | + | |
| 1258 | + getInstance()->controlledBroadcastToNodes(pingPacket, length, | |
| 1261 | 1259 | nodesToPing, sizeof(nodesToPing)); |
| 1262 | 1260 | } |
| 1263 | 1261 | |
| @@ -4248,15 +4246,15 @@ void Application::trackIncomingVoxelPacket(unsigned char* messageData, ssize_t m · 2984 unmodified lines | ||
| 4248 | 4246 | const HifiSockAddr& senderSockAddr, bool wasStatsPacket) { |
| 4249 | 4247 | |
| 4250 | 4248 | // Attempt to identify the sender from it's address. |
| 4251 | − Node* voxelServer = NodeList::getInstance()->nodeWithAddress(senderSockAddr); | |
| 4252 | − if (voxelServer) { | |
| 4253 | − QUuid nodeUUID = voxelServer->getUUID(); | |
| 4249 | + Node* serverNode = NodeList::getInstance()->nodeWithAddress(senderSockAddr); | |
| 4250 | + if (serverNode) { | |
| 4251 | + QUuid nodeUUID = serverNode->getUUID(); | |
| 4254 | 4252 | |
| 4255 | 4253 | // now that we know the node ID, let's add these stats to the stats for that node... |
| 4256 | 4254 | _voxelSceneStatsLock.lockForWrite(); |
| 4257 | 4255 | if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) { |
| 4258 | 4256 | VoxelSceneStats& stats = _octreeServerSceneStats[nodeUUID]; |
| 4259 | − stats.trackIncomingOctreePacket(messageData, messageLength, wasStatsPacket); | |
| 4257 | + stats.trackIncomingOctreePacket(messageData, messageLength, wasStatsPacket, serverNode->getClockSkewUsec()); | |
| 4260 | 4258 | } |
| 4261 | 4259 | _voxelSceneStatsLock.unlock(); |
| 4262 | 4260 | } |