mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-28 21:42:00 +02:00
Another fix: using strlen to determine the length of the packet is... unwise.
Remember the length when we create it. This should fix the voxel server's not appearing.
This commit is contained in:
parent
78072fbde0
commit
b57a78c414
1 changed files with 3 additions and 2 deletions
|
@ -205,6 +205,7 @@ void AgentList::sendDomainServerCheckIn() {
|
|||
|
||||
// construct the DS check in packet if we need to
|
||||
static unsigned char* checkInPacket = NULL;
|
||||
static int checkInPacketSize;
|
||||
|
||||
if (!checkInPacket) {
|
||||
int numBytesAgentsOfInterest = _agentTypesOfInterest ? strlen((char*) _agentTypesOfInterest) : 0;
|
||||
|
@ -236,10 +237,10 @@ void AgentList::sendDomainServerCheckIn() {
|
|||
packetPosition += numBytesAgentsOfInterest;
|
||||
}
|
||||
|
||||
*packetPosition = '\0';
|
||||
checkInPacketSize = packetPosition - checkInPacket;
|
||||
}
|
||||
|
||||
_agentSocket.send(DOMAIN_IP, DOMAINSERVER_PORT, checkInPacket, strlen((char*) checkInPacket));
|
||||
_agentSocket.send(DOMAIN_IP, DOMAINSERVER_PORT, checkInPacket, checkInPacketSize);
|
||||
}
|
||||
|
||||
int AgentList::processDomainServerList(unsigned char *packetData, size_t dataBytes) {
|
||||
|
|
Loading…
Reference in a new issue