fix infinite loop

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1920 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-12-20 13:26:44 +00:00
parent a83345e394
commit 22bf9b11b1

View File

@ -367,7 +367,8 @@ void p3disc::sendOwnDetails(std::string to)
std::cerr << "p3disc::sendOwnDetails() detail.currentserveraddr.sin_addr : " << inet_ntoa(detail.currentserveraddr.sin_addr) << ":" << ntohs(detail.currentlocaladdr.sin_port) << std::endl;
#endif
di -> ipAddressList.clear();
for ( std::list<IpAddressTimed>::iterator ipListIt = detail.getIpAddressList().begin(); ipListIt!= detail.getIpAddressList().end(); ipListIt++) {
std::list<IpAddressTimed> ipAddressListTemp = detail.getIpAddressList();
for ( std::list<IpAddressTimed>::iterator ipListIt = ipAddressListTemp.begin(); ipListIt!= ipAddressListTemp.end(); ipListIt++) {
IpAddressTimed ipAddress;
ipAddress.ipAddr = ipListIt->ipAddr;
ipAddress.seenTime = ipListIt->seenTime;
@ -450,7 +451,8 @@ void p3disc::sendPeerDetails(std::string to, std::string about)
// set the ip addresse list.
di -> ipAddressList.clear();
for ( std::list<IpAddressTimed>::iterator ipListIt = detail.getIpAddressList().begin(); ipListIt!= detail.getIpAddressList().end(); ipListIt++) {
std::list<IpAddressTimed> ipAddressListTemp = detail.getIpAddressList();
for ( std::list<IpAddressTimed>::iterator ipListIt = ipAddressListTemp.begin(); ipListIt!= ipAddressListTemp.end(); ipListIt++) {
IpAddressTimed ipAddress;
ipAddress.ipAddr = ipListIt->ipAddr;
ipAddress.seenTime = ipListIt->seenTime;