From d87de5121a92b405bf73e321ced96dc5b5bd8c29 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 3 Feb 2021 23:35:23 +0100 Subject: [PATCH] small fix to make setLocalAddress() and setExtAddress() also call mPeerMgr-UpdateOwnAddresses() --- libretroshare/src/pqi/p3netmgr.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libretroshare/src/pqi/p3netmgr.cc b/libretroshare/src/pqi/p3netmgr.cc index f9caad6ee..3ffa8a1fe 100644 --- a/libretroshare/src/pqi/p3netmgr.cc +++ b/libretroshare/src/pqi/p3netmgr.cc @@ -482,10 +482,6 @@ void p3NetMgrIMPL::netStatusTick() std::cerr << "ExtAddr: " << sockaddr_storage_tostring(tmpip); std::cerr << std::endl; #endif - /* XXX HACK TO FIX drbob: ALLOWING - * ExtAddrFinder -> ExtAddrStableOk = true - * (which it is not normally) */ - setExtAddress(tmpip); } } @@ -1152,7 +1148,8 @@ bool p3NetMgrIMPL::setLocalAddress(const struct sockaddr_storage &addr) } mLocalAddr = addr; - } + mPeerMgr->UpdateOwnAddress(mLocalAddr, mExtAddr); + } if (changed) { @@ -1188,7 +1185,8 @@ bool p3NetMgrIMPL::setExtAddress(const struct sockaddr_storage &addr) } mExtAddr = addr; - } + mPeerMgr->UpdateOwnAddress(mLocalAddr, mExtAddr); + } if (changed) {