add current local and external address to ip list

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1890 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-12-15 17:48:48 +00:00
parent 73d92b4a68
commit 83db3bebb9

View File

@ -1735,10 +1735,21 @@ void p3ConnectMgr::peerStatus(std::string id,
it->second.source = RS_CB_DISC;
it->second.disc = details;
it->second.currentlocaladdr = laddr;
it->second.currentserveraddr = raddr;
it->second.updateIpAddressList(ipDiscAddressList);
it->second.currentlocaladdr = laddr;
it->second.currentserveraddr = raddr;
//add the given address to the address list
IpAddressTimed laddrTimed;
laddrTimed.ipAddr = laddr;
laddrTimed.seenTime = time(NULL);
it->second.updateIpAddressList(laddrTimed);
IpAddressTimed raddrTimed;
raddrTimed.ipAddr = raddr;
raddrTimed.seenTime = time(NULL);
it->second.updateIpAddressList(raddrTimed);
if (flags & RS_NET_FLAGS_ONLINE)
{
it->second.actions |= RS_PEER_ONLINE;
@ -1761,10 +1772,21 @@ void p3ConnectMgr::peerStatus(std::string id,
it->second.source = RS_CB_PERSON;
it->second.peer = details;
it->second.currentlocaladdr = laddr;
it->second.currentserveraddr = raddr;
it->second.updateIpAddressList(ipDiscAddressList);
it->second.currentlocaladdr = laddr;
it->second.currentserveraddr = raddr;
//add the given address to the address list
IpAddressTimed laddrTimed;
laddrTimed.ipAddr = laddr;
laddrTimed.seenTime = time(NULL);
it->second.updateIpAddressList(laddrTimed);
IpAddressTimed raddrTimed;
raddrTimed.ipAddr = raddr;
raddrTimed.seenTime = time(NULL);
it->second.updateIpAddressList(raddrTimed);
it->second.state |= RS_PEER_S_ONLINE;
it->second.lastavailable = now;