From 225f65f4fb02df71ce4315973bea8359f8109a9a Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 28 Jun 2019 11:30:09 -0700 Subject: [PATCH] Log message tweaks Also don't need std in std::move, somehow. --- libraries/networking/src/LimitedNodeList.cpp | 8 +++++--- libraries/networking/src/udt/Socket.cpp | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index ac0f9e0b07..b5872a46fd 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -1088,12 +1088,14 @@ void LimitedNodeList::processSTUNResponse(std::unique_ptr packe if (parseSTUNResponse(packet.get(), newPublicAddress, newPublicPort)) { if (newPublicAddress != _publicSockAddr.getAddress() || newPublicPort != _publicSockAddr.getPort()) { - _publicSockAddr = HifiSockAddr(newPublicAddress, newPublicPort); - - qCDebug(networking, "New public socket received from STUN server is %s:%hu", + qCDebug(networking, "New public socket received from STUN server is %s:%hu (was %s:%hu)", + newPublicAddress.toString().toStdString().c_str(), + newPublicPort, _publicSockAddr.getAddress().toString().toLocal8Bit().constData(), _publicSockAddr.getPort()); + _publicSockAddr = HifiSockAddr(newPublicAddress, newPublicPort); + if (!_hasCompletedInitialSTUN) { // if we're here we have definitely completed our initial STUN sequence stopInitialSTUNUpdate(true); diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index e8fe3741aa..4714160ace 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -545,10 +545,10 @@ void Socket::handleRemoteAddressChange(HifiSockAddr previousAddress, HifiSockAdd const auto connectionIter = _connectionsHash.find(previousAddress); if (connectionIter != _connectionsHash.end()) { - auto connection = std::move(connectionIter->second); + auto connection = move(connectionIter->second); _connectionsHash.erase(connectionIter); connection->setDestinationAddress(currentAddress); - _connectionsHash[currentAddress] = std::move(connection); + _connectionsHash[currentAddress] = move(connection); } }