Ported branch commits 2980/1: cleaned the code in IP address lists management. Removed some bugs. Changed the strategy a bit: only keep the most recent port for identical ips. Changed the interface of extAddrFinder to make it mroe secure.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2983 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-05-23 22:27:10 +00:00
parent 591a141a18
commit 757aa7a95d
6 changed files with 346 additions and 313 deletions

View file

@ -12,7 +12,7 @@ class ExtAddrFinder
ExtAddrFinder() ;
~ExtAddrFinder() ;
bool hasValidIP(struct sockaddr_in *addr) ;
bool hasValidIP(struct in_addr *addr) ;
void getIPServersList(std::list<std::string>& ip_servers) { ip_servers = _ip_servers ; }
void start_request() ;
@ -24,7 +24,7 @@ class ExtAddrFinder
time_t *mFoundTS;
RsMutex _addrMtx ;
struct sockaddr_in *_addr ;
struct in_addr *_addr ;
bool *_found ;
bool *_searching ;
std::list<std::string> _ip_servers ;