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
154 // call Menu getInstance static method to set up the menu154 // call Menu getInstance static method to set up the menu
155 _window->setMenuBar(Menu::getInstance());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 unsigned int listenPort = 0; // bind to an ephemeral port by default159 unsigned int listenPort = 0; // bind to an ephemeral port by default
160 const char** constArgv = const_cast<const char**>(argv);160 const char** constArgv = const_cast<const char**>(argv);
@@ -1252,12 +1252,10 @@ void Application::sendPingPackets() { · 1091 unmodified lines
1252 const char nodesToPing[] = {NODE_TYPE_VOXEL_SERVER, NODE_TYPE_PARTICLE_SERVER, 1252 const char nodesToPing[] = {NODE_TYPE_VOXEL_SERVER, NODE_TYPE_PARTICLE_SERVER,
1253 NODE_TYPE_AUDIO_MIXER, NODE_TYPE_AVATAR_MIXER};1253 NODE_TYPE_AUDIO_MIXER, NODE_TYPE_AVATAR_MIXER};
1254 1254
1255 uint64_t currentTime = usecTimestampNow();1255 unsigned char pingPacket[MAX_PACKET_SIZE];
1256 unsigned char pingPacket[numBytesForPacketHeader((unsigned char*) &PACKET_TYPE_PING) + sizeof(currentTime)];1256 int length = NodeList::getInstance()->fillPingPacket(pingPacket);
1257 int numHeaderBytes = populateTypeAndVersion(pingPacket, PACKET_TYPE_PING);1257
1258 1258 getInstance()->controlledBroadcastToNodes(pingPacket, length,
1259 memcpy(pingPacket + numHeaderBytes, &currentTime, sizeof(currentTime));
1260 getInstance()->controlledBroadcastToNodes(pingPacket, sizeof(pingPacket),
1261 nodesToPing, sizeof(nodesToPing));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 const HifiSockAddr& senderSockAddr, bool wasStatsPacket) {4246 const HifiSockAddr& senderSockAddr, bool wasStatsPacket) {
4249 4247
4250 // Attempt to identify the sender from it's address.4248 // Attempt to identify the sender from it's address.
4251 Node* voxelServer = NodeList::getInstance()->nodeWithAddress(senderSockAddr);4249 Node* serverNode = NodeList::getInstance()->nodeWithAddress(senderSockAddr);
4252 if (voxelServer) {4250 if (serverNode) {
4253 QUuid nodeUUID = voxelServer->getUUID();4251 QUuid nodeUUID = serverNode->getUUID();
4254 4252
4255 // now that we know the node ID, let's add these stats to the stats for that node...4253 // now that we know the node ID, let's add these stats to the stats for that node...
4256 _voxelSceneStatsLock.lockForWrite();4254 _voxelSceneStatsLock.lockForWrite();
4257 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {4255 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
4258 VoxelSceneStats& stats = _octreeServerSceneStats[nodeUUID];4256 VoxelSceneStats& stats = _octreeServerSceneStats[nodeUUID];
4259 stats.trackIncomingOctreePacket(messageData, messageLength, wasStatsPacket);4257 stats.trackIncomingOctreePacket(messageData, messageLength, wasStatsPacket, serverNode->getClockSkewUsec());
4260 }4258 }
4261 _voxelSceneStatsLock.unlock();4259 _voxelSceneStatsLock.unlock();
4262 }4260 }

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