mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-19 04:44:21 -05:00
improve address list config serialization
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1916 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
808ac84fa8
commit
cc6b480156
@ -2891,8 +2891,6 @@ bool p3ConnectMgr::loadList(std::list<RsItem *> load)
|
|||||||
#endif
|
#endif
|
||||||
/* add ownConfig */
|
/* add ownConfig */
|
||||||
setOwnNetConfig(pitem->netMode, pitem->visState);
|
setOwnNetConfig(pitem->netMode, pitem->visState);
|
||||||
setLocalAddress(pitem->pid, pitem->currentlocaladdr);
|
|
||||||
setExtAddress(pitem->pid, pitem->currentremoteaddr);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2903,10 +2901,10 @@ bool p3ConnectMgr::loadList(std::list<RsItem *> load)
|
|||||||
#endif
|
#endif
|
||||||
/* ************* */
|
/* ************* */
|
||||||
addFriend(pitem->pid, pitem->netMode, pitem->visState, pitem->lastContact);
|
addFriend(pitem->pid, pitem->netMode, pitem->visState, pitem->lastContact);
|
||||||
setLocalAddress(pitem->pid, pitem->currentlocaladdr);
|
|
||||||
setExtAddress(pitem->pid, pitem->currentremoteaddr);
|
|
||||||
setAddressList(pitem->pid, pitem->ipAddressList);
|
|
||||||
}
|
}
|
||||||
|
setLocalAddress(pitem->pid, pitem->currentlocaladdr);
|
||||||
|
setExtAddress(pitem->pid, pitem->currentremoteaddr);
|
||||||
|
setAddressList(pitem->pid, pitem->ipAddressList);
|
||||||
}
|
}
|
||||||
else if (sitem)
|
else if (sitem)
|
||||||
{
|
{
|
||||||
|
@ -889,11 +889,10 @@ RsPeerNetItem *RsPeerConfigSerialiser::deserialiseNet(void *data, uint32_t *size
|
|||||||
IpAddressTimed ipTimed;
|
IpAddressTimed ipTimed;
|
||||||
sockaddr_clear(&ipTimed.ipAddr);
|
sockaddr_clear(&ipTimed.ipAddr);
|
||||||
ok &= GetTlvIpAddrPortV4(data, rssize, &offset, TLV_TYPE_IPV4_REMOTE, &ipTimed.ipAddr);
|
ok &= GetTlvIpAddrPortV4(data, rssize, &offset, TLV_TYPE_IPV4_REMOTE, &ipTimed.ipAddr);
|
||||||
|
if (!ok) { break;}
|
||||||
uint64_t time = 0;
|
uint64_t time = 0;
|
||||||
ok &= getRawUInt64(data, rssize, &offset, &time);
|
ok &= getRawUInt64(data, rssize, &offset, &time);
|
||||||
if (!ok) {
|
if (!ok) { break;}
|
||||||
break;
|
|
||||||
}
|
|
||||||
ipTimed.seenTime = time;
|
ipTimed.seenTime = time;
|
||||||
ipTimedList.push_back(ipTimed);
|
ipTimedList.push_back(ipTimed);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user