Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -993,7 +993,11 @@ void Application::sendAvatarVoxelURLMessage(const QUrl& url) { · 992 unmodified lines | ||
| 993 | 993 | return; // we don't yet know who we are |
| 994 | 994 | } |
| 995 | 995 | QByteArray message; |
| 996 | − message.append(PACKET_TYPE_AVATAR_VOXEL_URL); | |
| 996 | + | |
| 997 | + char packetHeader[MAX_PACKET_HEADER_BYTES]; | |
| 998 | + int numBytesPacketHeader = populateTypeAndVersion((unsigned char*) packetHeader, PACKET_TYPE_AVATAR_VOXEL_URL); | |
| 999 | + | |
| 1000 | + message.append(packetHeader, numBytesPacketHeader); | |
| 997 | 1001 | message.append((const char*)&ownerID, sizeof(ownerID)); |
| 998 | 1002 | message.append(url.toEncoded()); |
| 999 | 1003 | |
| @@ -1002,8 +1006,9 @@ void Application::sendAvatarVoxelURLMessage(const QUrl& url) { · 2 unmodified lines | ||
| 1002 | 1006 | |
| 1003 | 1007 | void Application::processAvatarVoxelURLMessage(unsigned char *packetData, size_t dataBytes) { |
| 1004 | 1008 | // skip the header |
| 1005 | − packetData++; | |
| 1006 | − dataBytes--; | |
| 1009 | + int numBytesPacketHeader = numBytesForPacketHeader(packetData); | |
| 1010 | + packetData += numBytesPacketHeader; | |
| 1011 | + dataBytes -= numBytesPacketHeader; | |
| 1007 | 1012 | |
| 1008 | 1013 | // read the node id |
| 1009 | 1014 | uint16_t nodeID = *(uint16_t*)packetData; |