mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04:00
Added send of updated discovery information.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6570 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
aeb430cabb
commit
041bdaab50
3 changed files with 145 additions and 77 deletions
|
@ -742,16 +742,34 @@ void p3disc::recvPeerDetails(RsDiscReply *item, const std::string &certGpgId)
|
|||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
bool peerDataChanged = false;
|
||||
|
||||
// When the peer sends his own list of IPs, the info replaces the existing info, because the
|
||||
// peer is the primary source of his own IPs.
|
||||
mPeerMgr->setNetworkMode(pit->pid, pit->netMode);
|
||||
mPeerMgr->setLocation(pit->pid, pit->location);
|
||||
mPeerMgr->setLocalAddress(pit->pid, pit->currentlocaladdr);
|
||||
mPeerMgr->setExtAddress(pit->pid, pit->currentremoteaddr);
|
||||
mPeerMgr->setVisState(pit->pid, pit->visState);
|
||||
if (mPeerMgr->setNetworkMode(pit->pid, pit->netMode)) {
|
||||
peerDataChanged = true;
|
||||
}
|
||||
if (mPeerMgr->setLocation(pit->pid, pit->location)) {
|
||||
peerDataChanged = true;
|
||||
}
|
||||
if (mPeerMgr->setLocalAddress(pit->pid, pit->currentlocaladdr)) {
|
||||
peerDataChanged = true;
|
||||
}
|
||||
if (mPeerMgr->setExtAddress(pit->pid, pit->currentremoteaddr)) {
|
||||
peerDataChanged = true;
|
||||
}
|
||||
if (mPeerMgr->setVisState(pit->pid, pit->visState)) {
|
||||
peerDataChanged = true;
|
||||
}
|
||||
if (mPeerMgr->setDynDNS(pit->pid, pit->dyndns)) {
|
||||
peerDataChanged = true;
|
||||
}
|
||||
|
||||
if (pit->dyndns != "")
|
||||
mPeerMgr->setDynDNS(pit->pid, pit->dyndns);
|
||||
if (peerDataChanged == true)
|
||||
{
|
||||
// inform all connected peers of change
|
||||
sendJustConnectedPeerInfoToAllPeer(pit->pid);
|
||||
}
|
||||
}
|
||||
|
||||
// always update historical address list... this should be enough to let us connect.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue