mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:17:40 +02:00
activate public socket if a node sends data to VS and AM
This commit is contained in:
parent
6a20490e4f
commit
9e3de05e97
2 changed files with 12 additions and 0 deletions
|
@ -326,6 +326,12 @@ void AudioMixer::run() {
|
||||||
|
|
||||||
if (matchingNode) {
|
if (matchingNode) {
|
||||||
nodeList->updateNodeWithData(matchingNode, nodeAddress, packetData, receivedBytes);
|
nodeList->updateNodeWithData(matchingNode, nodeAddress, packetData, receivedBytes);
|
||||||
|
|
||||||
|
if (!matchingNode->getActiveSocket()) {
|
||||||
|
// we don't have an active socket for this node, but they're talking to us
|
||||||
|
// this means they've heard from us and can reply, let's assume public is active
|
||||||
|
matchingNode->activatePublicSocket();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// let processNodeData handle it.
|
// let processNodeData handle it.
|
||||||
|
|
|
@ -460,6 +460,12 @@ void VoxelServer::run() {
|
||||||
if (node) {
|
if (node) {
|
||||||
nodeList->updateNodeWithData(node, &senderAddress, packetData, packetLength);
|
nodeList->updateNodeWithData(node, &senderAddress, packetData, packetLength);
|
||||||
|
|
||||||
|
if (!node->getActiveSocket()) {
|
||||||
|
// we don't have an active socket for this node, but they're talking to us
|
||||||
|
// this means they've heard from us and can reply, let's assume public is active
|
||||||
|
node->activatePublicSocket();
|
||||||
|
}
|
||||||
|
|
||||||
VoxelNodeData* nodeData = (VoxelNodeData*) node->getLinkedData();
|
VoxelNodeData* nodeData = (VoxelNodeData*) node->getLinkedData();
|
||||||
if (nodeData && !nodeData->isVoxelSendThreadInitalized()) {
|
if (nodeData && !nodeData->isVoxelSendThreadInitalized()) {
|
||||||
nodeData->initializeVoxelSendThread(this);
|
nodeData->initializeVoxelSendThread(this);
|
||||||
|
|
Loading…
Reference in a new issue