Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -3820,6 +3820,12 @@ void Application::attachNewHeadToNode(Node* newNode) { · 3819 unmodified lines | |||
| 3820 | } | 3820 | } |
| 3821 | } | 3821 | } |
| 3822 | 3822 | ||
| 3823 | int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLength, sockaddr senderAddress) { | ||
| 3824 | //Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress); | ||
| 3825 | int statsMessageLength = _voxelSceneStats.unpackFromMessage(messageData, messageLength); | ||
| 3826 | return statsMessageLength; | ||
| 3827 | } | ||
| 3828 | |||
| 3823 | // Receive packets from other nodes/servers and decide what to do with them! | 3829 | // Receive packets from other nodes/servers and decide what to do with them! |
| 3824 | void* Application::networkReceive(void* args) { | 3830 | void* Application::networkReceive(void* args) { |
| 3825 | sockaddr senderAddress; | 3831 | sockaddr senderAddress; |
| @@ -3863,7 +3869,8 @@ void* Application::networkReceive(void* args) { · 37 unmodified lines | |||
| 3863 | // immediately following them inside the same packet. So, we process the PACKET_TYPE_VOXEL_STATS first | 3869 | // immediately following them inside the same packet. So, we process the PACKET_TYPE_VOXEL_STATS first |
| 3864 | // then process any remaining bytes as if it was another packet | 3870 | // then process any remaining bytes as if it was another packet |
| 3865 | if (messageData[0] == PACKET_TYPE_VOXEL_STATS) { | 3871 | if (messageData[0] == PACKET_TYPE_VOXEL_STATS) { |
| 3866 | int statsMessageLength = app->_voxelSceneStats.unpackFromMessage(messageData, messageLength); | 3872 | |
| 3873 | int statsMessageLength = app->parseVoxelStats(messageData, messageLength, senderAddress); | ||
| 3867 | if (messageLength > statsMessageLength) { | 3874 | if (messageLength > statsMessageLength) { |
| 3868 | messageData += statsMessageLength; | 3875 | messageData += statsMessageLength; |
| 3869 | messageLength -= statsMessageLength; | 3876 | messageLength -= statsMessageLength; |