mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:58:56 +02:00
fix send of existing peer to querier
This commit is contained in:
parent
e096cbe040
commit
da0c9fbc31
3 changed files with 14 additions and 11 deletions
|
@ -82,7 +82,7 @@ void IceServer::processDatagrams() {
|
||||||
|
|
||||||
if (matchingPeer) {
|
if (matchingPeer) {
|
||||||
// we have the peer they want to connect to - send them pack the information for that peer
|
// we have the peer they want to connect to - send them pack the information for that peer
|
||||||
sendPeerInformationPacket(matchingPeer.data(), &sendingSockAddr);
|
sendPeerInformationPacket(*(matchingPeer.data()), &sendingSockAddr);
|
||||||
|
|
||||||
// we also need to send them to the active peer they are hoping to connect to
|
// we also need to send them to the active peer they are hoping to connect to
|
||||||
// create a dummy peer object we can pass to sendPeerInformationPacket
|
// create a dummy peer object we can pass to sendPeerInformationPacket
|
||||||
|
@ -118,8 +118,6 @@ SharedNetworkPeer IceServer::addOrUpdateHeartbeatingPeer(const QByteArray& incom
|
||||||
// we already had the peer so just potentially update their sockets
|
// we already had the peer so just potentially update their sockets
|
||||||
matchingPeer->setPublicSocket(publicSocket);
|
matchingPeer->setPublicSocket(publicSocket);
|
||||||
matchingPeer->setLocalSocket(localSocket);
|
matchingPeer->setLocalSocket(localSocket);
|
||||||
|
|
||||||
qDebug() << "Matched hearbeat to existing network peer" << *matchingPeer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update our last heard microstamp for this network peer to now
|
// update our last heard microstamp for this network peer to now
|
||||||
|
|
|
@ -840,7 +840,7 @@ void LimitedNodeList::sendPacketToIceServer(PacketType packetType, const HifiSoc
|
||||||
<< uuidStringWithoutCurlyBraces(peerID);
|
<< uuidStringWithoutCurlyBraces(peerID);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeUnverifiedDatagram(iceRequestByteArray, iceServerSockAddr);
|
writeUnverifiedDatagram(iceRequestByteArray, HifiSockAddr("127.0.0.1", ICE_SERVER_DEFAULT_PORT));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LimitedNodeList::putLocalPortIntoSharedMemory(const QString key, QObject* parent, quint16 localPort) {
|
void LimitedNodeList::putLocalPortIntoSharedMemory(const QString key, QObject* parent, quint16 localPort) {
|
||||||
|
|
|
@ -145,18 +145,24 @@ void NetworkPeer::setActiveSocket(HifiSockAddr* discoveredSocket) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkPeer::activateLocalSocket() {
|
void NetworkPeer::activateLocalSocket() {
|
||||||
qCDebug(networking) << "Activating local socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
if (_activeSocket != &_localSocket) {
|
||||||
setActiveSocket(&_localSocket);
|
qCDebug(networking) << "Activating local socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||||
|
setActiveSocket(&_localSocket);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkPeer::activatePublicSocket() {
|
void NetworkPeer::activatePublicSocket() {
|
||||||
qCDebug(networking) << "Activating public socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
if (_activeSocket != &_publicSocket) {
|
||||||
setActiveSocket(&_publicSocket);
|
qCDebug(networking) << "Activating public socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||||
|
setActiveSocket(&_publicSocket);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkPeer::activateSymmetricSocket() {
|
void NetworkPeer::activateSymmetricSocket() {
|
||||||
qCDebug(networking) << "Activating symmetric socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
if (_activeSocket != &_symmetricSocket) {
|
||||||
setActiveSocket(&_symmetricSocket);
|
qCDebug(networking) << "Activating symmetric socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||||
|
setActiveSocket(&_symmetricSocket);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkPeer::activateMatchingOrNewSymmetricSocket(const HifiSockAddr& matchableSockAddr) {
|
void NetworkPeer::activateMatchingOrNewSymmetricSocket(const HifiSockAddr& matchableSockAddr) {
|
||||||
|
@ -182,7 +188,6 @@ void NetworkPeer::softReset() {
|
||||||
_connectionAttempts = 0;
|
_connectionAttempts = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QByteArray NetworkPeer::toByteArray() const {
|
QByteArray NetworkPeer::toByteArray() const {
|
||||||
QByteArray peerByteArray;
|
QByteArray peerByteArray;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue