diff --git a/libretroshare/src/pqi/p3netmgr.cc b/libretroshare/src/pqi/p3netmgr.cc index 0583bfb72..c2ea41351 100644 --- a/libretroshare/src/pqi/p3netmgr.cc +++ b/libretroshare/src/pqi/p3netmgr.cc @@ -1082,7 +1082,15 @@ bool p3NetMgrIMPL::checkNetAddress() { RsInfo() << __PRETTY_FUNCTION__ << " local address changed, resetting" <<" network." << std::endl; - + + if(rsEvents) + { + auto ev = std::make_shared(); + ev->mNetworkEventCode = RsNetworkEventCode::LOCAL_IP_UPDATED; + ev->mIPAddress = sockaddr_storage_iptostring(mLocalAddr); + rsEvents->postEvent(ev); + } + if (mPeerMgr) mPeerMgr->UpdateOwnAddress(mLocalAddr, mExtAddr); netReset(); @@ -1123,13 +1131,6 @@ bool p3NetMgrIMPL::setLocalAddress(const struct sockaddr_storage &addr) #ifdef NETMGR_DEBUG_RESET std::cerr << "p3NetMgrIMPL::setLocalAddress() Calling NetReset" << std::endl; #endif - if(rsEvents) - { - auto ev = std::make_shared(); - ev->mNetworkEventCode = RsNetworkEventCode::LOCAL_IP_UPDATED; - ev->mIPAddress = sockaddr_storage_iptostring(addr); - rsEvents->postEvent(ev); - } rslog(RSL_WARNING, p3netmgrzone, "p3NetMgr::setLocalAddress() local address changed, resetting network"); netReset(); } diff --git a/libretroshare/src/pqi/p3peermgr.cc b/libretroshare/src/pqi/p3peermgr.cc index ffcc96031..b072a55de 100644 --- a/libretroshare/src/pqi/p3peermgr.cc +++ b/libretroshare/src/pqi/p3peermgr.cc @@ -317,7 +317,7 @@ void p3PeerMgrIMPL::tick() const RsPeerId& p3PeerMgrIMPL::getOwnId() { - return AuthSSL::getAuthSSL()->OwnId(); + return AuthSSL::getAuthSSL()->OwnId(); } diff --git a/retroshare-gui/src/gui/HomePage.cpp b/retroshare-gui/src/gui/HomePage.cpp index e1400af66..e57525f9d 100644 --- a/retroshare-gui/src/gui/HomePage.cpp +++ b/retroshare-gui/src/gui/HomePage.cpp @@ -126,7 +126,7 @@ void HomePage::handleEvent(std::shared_ptr e) const RsNetworkEvent *ne = dynamic_cast(e.get()); - if(ne) + if(!ne) return; // in any case we update the IPs