mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 10:43: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) {
|
||||
// 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
|
||||
// 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
|
||||
matchingPeer->setPublicSocket(publicSocket);
|
||||
matchingPeer->setLocalSocket(localSocket);
|
||||
|
||||
qDebug() << "Matched hearbeat to existing network peer" << *matchingPeer;
|
||||
}
|
||||
|
||||
// update our last heard microstamp for this network peer to now
|
||||
|
|
|
@ -840,7 +840,7 @@ void LimitedNodeList::sendPacketToIceServer(PacketType packetType, const HifiSoc
|
|||
<< 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) {
|
||||
|
|
|
@ -145,18 +145,24 @@ void NetworkPeer::setActiveSocket(HifiSockAddr* discoveredSocket) {
|
|||
}
|
||||
|
||||
void NetworkPeer::activateLocalSocket() {
|
||||
qCDebug(networking) << "Activating local socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||
setActiveSocket(&_localSocket);
|
||||
if (_activeSocket != &_localSocket) {
|
||||
qCDebug(networking) << "Activating local socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||
setActiveSocket(&_localSocket);
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkPeer::activatePublicSocket() {
|
||||
qCDebug(networking) << "Activating public socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||
setActiveSocket(&_publicSocket);
|
||||
if (_activeSocket != &_publicSocket) {
|
||||
qCDebug(networking) << "Activating public socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||
setActiveSocket(&_publicSocket);
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkPeer::activateSymmetricSocket() {
|
||||
qCDebug(networking) << "Activating symmetric socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||
setActiveSocket(&_symmetricSocket);
|
||||
if (_activeSocket != &_symmetricSocket) {
|
||||
qCDebug(networking) << "Activating symmetric socket for network peer with ID" << uuidStringWithoutCurlyBraces(_uuid);
|
||||
setActiveSocket(&_symmetricSocket);
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkPeer::activateMatchingOrNewSymmetricSocket(const HifiSockAddr& matchableSockAddr) {
|
||||
|
@ -182,7 +188,6 @@ void NetworkPeer::softReset() {
|
|||
_connectionAttempts = 0;
|
||||
}
|
||||
|
||||
|
||||
QByteArray NetworkPeer::toByteArray() const {
|
||||
QByteArray peerByteArray;
|
||||
|
||||
|
|
Loading…
Reference in a new issue