mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04:00
Networking REWORK: Changes for other bits
* Fixed #includes in upnp * switched p3disc over to the new data types. * added new source to .pro file * minor changes to other code. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3249 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8745c2fe2e
commit
ae4ee9df00
7 changed files with 54 additions and 31 deletions
|
@ -353,7 +353,9 @@ void p3disc::sendPeerDetails(std::string to, std::string about) {
|
|||
rsPeerNetItem->currentlocaladdr = detail.currentlocaladdr;
|
||||
rsPeerNetItem->currentremoteaddr = detail.currentserveraddr;
|
||||
rsPeerNetItem->dyndns = detail.dyndns;
|
||||
rsPeerNetItem->ipAddressList = detail.getIpAddressList();
|
||||
detail.ipAddrs.mLocal.loadTlv(rsPeerNetItem->localAddrList);
|
||||
detail.ipAddrs.mExt.loadTlv(rsPeerNetItem->extAddrList);
|
||||
|
||||
|
||||
di->rsPeerList.push_back(*rsPeerNetItem);
|
||||
}
|
||||
|
@ -377,7 +379,9 @@ void p3disc::sendPeerDetails(std::string to, std::string about) {
|
|||
rsPeerNetItem->currentlocaladdr = detail.currentlocaladdr;
|
||||
rsPeerNetItem->currentremoteaddr = detail.currentserveraddr;
|
||||
rsPeerNetItem->dyndns = detail.dyndns;
|
||||
rsPeerNetItem->ipAddressList = detail.getIpAddressList();
|
||||
detail.ipAddrs.mLocal.loadTlv(rsPeerNetItem->localAddrList);
|
||||
detail.ipAddrs.mExt.loadTlv(rsPeerNetItem->extAddrList);
|
||||
|
||||
|
||||
di->rsPeerList.push_back(*rsPeerNetItem);
|
||||
}
|
||||
|
@ -610,18 +614,25 @@ void p3disc::recvPeerDetails(RsDiscReply *item)
|
|||
merge = false ;
|
||||
}
|
||||
}
|
||||
|
||||
pqiIpAddrSet addrsFromPeer;
|
||||
addrsFromPeer.mLocal.loadTlv(pitem->localAddrList);
|
||||
addrsFromPeer.mExt.loadTlv(pitem->extAddrList);
|
||||
|
||||
|
||||
#ifdef P3DISC_DEBUG
|
||||
std::cerr << "Friend is already connected -> not updating" << std::endl;
|
||||
|
||||
std::cerr << "Setting address list to peer " << pitem->pid << ", to be:" << std::endl ;
|
||||
for(std::list<IpAddressTimed>::const_iterator it(pitem->ipAddressList.begin());it!=pitem->ipAddressList.end();++it)
|
||||
std::cerr << " " << (*it).ipAddr << " (" << (*it).seenTime << ")" << std::endl ;
|
||||
|
||||
addrsFromPeer.printAddrs(std::cerr);
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
// allways update address list and dns, except if it's ours
|
||||
if (pitem->dyndns != "")
|
||||
mConnMgr->setDynDNS(pitem->pid, pitem->dyndns);
|
||||
|
||||
mConnMgr->updateAddressList(pitem->pid, pitem->ipAddressList,merge);
|
||||
mConnMgr->updateAddressList(pitem->pid, addrsFromPeer);
|
||||
}
|
||||
#ifdef P3DISC_DEBUG
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue