diff --git a/ice-server/src/IceServer.cpp b/ice-server/src/IceServer.cpp index c39a2259af..8b5e5a4b39 100644 --- a/ice-server/src/IceServer.cpp +++ b/ice-server/src/IceServer.cpp @@ -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 diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 61d844c1be..c02eff4b75 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -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) { diff --git a/libraries/networking/src/NetworkPeer.cpp b/libraries/networking/src/NetworkPeer.cpp index 77e3de13e0..f1197e5da0 100644 --- a/libraries/networking/src/NetworkPeer.cpp +++ b/libraries/networking/src/NetworkPeer.cpp @@ -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;