History

use packet version helpers for PACKET_TYPE_AVATAR_VOXEL_URL

Stephen Birarda committed 13 years ago

Commit 202d4461 parent a287d6d1 file · +8 −3Browse files

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

Unified · Split

interface/src/Application.cpp+8−3
@@ -993,7 +993,11 @@ void Application::sendAvatarVoxelURLMessage(const QUrl& url) { · 992 unmodified lines
993993 return; // we don't yet know who we are
994994 }
995995 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);
9971001 message.append((const char*)&ownerID, sizeof(ownerID));
9981002 message.append(url.toEncoded());
9991003
@@ -1002,8 +1006,9 @@ void Application::sendAvatarVoxelURLMessage(const QUrl& url) { · 2 unmodified lines
10021006
10031007 void Application::processAvatarVoxelURLMessage(unsigned char *packetData, size_t dataBytes) {
10041008 // skip the header
1005− packetData++;
1006− dataBytes--;
1009+ int numBytesPacketHeader = numBytesForPacketHeader(packetData);
1010+ packetData += numBytesPacketHeader;
1011+ dataBytes -= numBytesPacketHeader;
10071012
10081013 // read the node id
10091014 uint16_t nodeID = *(uint16_t*)packetData;

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