mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
handle stun response in assigned clients
This commit is contained in:
parent
224b0d9671
commit
747175311f
4 changed files with 9 additions and 7 deletions
|
@ -186,7 +186,8 @@ void Agent::run() {
|
|||
qDebug() << "Uncaught exception at line" << line << ":" << engine.uncaughtException().toString() << "\n";
|
||||
}
|
||||
|
||||
while (NodeList::getInstance()->getNodeSocket()->receive((sockaddr*) &senderAddress, receivedData, &receivedBytes)) {
|
||||
while (NodeList::getInstance()->getNodeSocket()->receive((sockaddr*) &senderAddress, receivedData, &receivedBytes)
|
||||
&& packetVersionMatch(receivedData)) {
|
||||
if (!firstDomainCheckIn && receivedData[0] == PACKET_TYPE_DOMAIN) {
|
||||
firstDomainCheckIn = true;
|
||||
}
|
||||
|
|
|
@ -399,9 +399,8 @@ void AudioMixer::run() {
|
|||
|
||||
// give the new audio data to the matching injector node
|
||||
nodeList->updateNodeWithData(matchingInjector, packetData, receivedBytes);
|
||||
} else if (packetData[0] == PACKET_TYPE_PING || packetData[0] == PACKET_TYPE_DOMAIN) {
|
||||
|
||||
// If the packet is a ping, let processNodeData handle it.
|
||||
} else {
|
||||
// let processNodeData handle it.
|
||||
nodeList->processNodeData(nodeAddress, packetData, receivedBytes);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -614,7 +614,7 @@ int DomainServer::run() {
|
|||
int numHeaderBytes = populateTypeAndVersion(broadcastPacket, PACKET_TYPE_CREATE_ASSIGNMENT);
|
||||
int numAssignmentBytes = assignmentToDeploy->packToBuffer(broadcastPacket + numHeaderBytes);
|
||||
|
||||
nodeList->getNodeSocket()->send((sockaddr*) &nodePublicAddress,
|
||||
nodeList->getNodeSocket()->send((sockaddr*) &senderAddress,
|
||||
broadcastPacket,
|
||||
numHeaderBytes + numAssignmentBytes);
|
||||
}
|
||||
|
|
|
@ -398,8 +398,10 @@ void VoxelServer::run() {
|
|||
nodeData->initializeVoxelSendThread(this);
|
||||
}
|
||||
|
||||
} else if (packetData[0] == PACKET_TYPE_PING) {
|
||||
// If the packet is a ping, let processNodeData handle it.
|
||||
} else if (packetData[0] == PACKET_TYPE_PING
|
||||
|| packetData[0] == PACKET_TYPE_DOMAIN
|
||||
|| packetData[0] == PACKET_TYPE_STUN_RESPONSE) {
|
||||
// let processNodeData handle it.
|
||||
NodeList::getInstance()->processNodeData(&senderAddress, packetData, packetLength);
|
||||
} else if (packetData[0] == PACKET_TYPE_DOMAIN) {
|
||||
NodeList::getInstance()->processNodeData(&senderAddress, packetData, packetLength);
|
||||
|
|
Loading…
Reference in a new issue