mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
hack the NodeList to take the socket on which pinged as active socket
This commit is contained in:
parent
069008c03f
commit
5c7ac6d3a1
1 changed files with 8 additions and 4 deletions
|
@ -294,6 +294,10 @@ void NodeList::processNodeData(const HifiSockAddr& senderSockAddr, const QByteAr
|
|||
matchingNode->setLastHeardMicrostamp(usecTimestampNow());
|
||||
QByteArray replyPacket = constructPingReplyPacket(packet);
|
||||
writeDatagram(replyPacket, matchingNode, senderSockAddr);
|
||||
|
||||
// HACK for hacker dojo network demo
|
||||
matchingNode->setPublicSocket(senderSockAddr);
|
||||
matchingNode->activatePublicSocket();
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -829,13 +833,13 @@ SharedNodePointer NodeList::updateSocketsForNode(const QUuid& uuid,
|
|||
|
||||
// check if we need to change this node's public or local sockets
|
||||
if (publicSocket != matchingNode->getPublicSocket()) {
|
||||
matchingNode->setPublicSocket(publicSocket);
|
||||
qDebug() << "Public socket change for node" << *matchingNode;
|
||||
// matchingNode->setPublicSocket(publicSocket);
|
||||
// qDebug() << "Public socket change for node" << *matchingNode;
|
||||
}
|
||||
|
||||
if (localSocket != matchingNode->getLocalSocket()) {
|
||||
matchingNode->setLocalSocket(localSocket);
|
||||
qDebug() << "Local socket change for node" << *matchingNode;
|
||||
// matchingNode->setLocalSocket(localSocket);
|
||||
// qDebug() << "Local socket change for node" << *matchingNode;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue