History

Merge branch 'master' of https://github.com/worklist/hifi into injected-audio

Stephen Birarda committed 12 years ago

Commit 0eb22fd2 parents bdf8c4b 38b59f925 files · +185 −58Browse files

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

Unified · Split

interface/src/Application.cpp+9−11
@@ -154,7 +154,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 153 unmodified lines
154154 // call Menu getInstance static method to set up the menu
155155 _window->setMenuBar(Menu::getInstance());
156156
157− qDebug("[VERSION] Build sequence: %i", BUILD_VERSION);
157+ qDebug("[VERSION] Build sequence: %i\n", BUILD_VERSION);
158158
159159 unsigned int listenPort = 0; // bind to an ephemeral port by default
160160 const char** constArgv = const_cast<const char**>(argv);
@@ -1252,12 +1252,10 @@ void Application::sendPingPackets() { · 1091 unmodified lines
12521252 const char nodesToPing[] = {NODE_TYPE_VOXEL_SERVER, NODE_TYPE_PARTICLE_SERVER,
12531253 NODE_TYPE_AUDIO_MIXER, NODE_TYPE_AVATAR_MIXER};
12541254
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, &currentTime, 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,
12611259 nodesToPing, sizeof(nodesToPing));
12621260 }
12631261
@@ -4248,15 +4246,15 @@ void Application::trackIncomingVoxelPacket(unsigned char* messageData, ssize_t m · 2984 unmodified lines
42484246 const HifiSockAddr& senderSockAddr, bool wasStatsPacket) {
42494247
42504248 // 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();
42544252
42554253 // now that we know the node ID, let's add these stats to the stats for that node...
42564254 _voxelSceneStatsLock.lockForWrite();
42574255 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
42584256 VoxelSceneStats& stats = _octreeServerSceneStats[nodeUUID];
4259− stats.trackIncomingOctreePacket(messageData, messageLength, wasStatsPacket);
4257+ stats.trackIncomingOctreePacket(messageData, messageLength, wasStatsPacket, serverNode->getClockSkewUsec());
42604258 }
42614259 _voxelSceneStatsLock.unlock();
42624260 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t