mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Fixed compile on Windows and removed some compiler warnings.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4033 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
074f382eab
commit
4b8766aec3
3 changed files with 3 additions and 2 deletions
|
@ -3311,7 +3311,7 @@ bool p3ConnectMgr::checkNetAddress()
|
|||
// Random port avoids clashes, improves anonymity.
|
||||
//
|
||||
uint32_t default_port_seed = 0 ;
|
||||
for(uint i=0;i<mOwnState.id.size();++i)
|
||||
for(std::string::size_type i=0;i<mOwnState.id.size();++i)
|
||||
default_port_seed = (0x473a8b74u * (unsigned int)(mOwnState.id[i]) + default_port_seed)^0x11837bea ;
|
||||
|
||||
mOwnState.currentlocaladdr.sin_port = htons(PQI_MIN_PORT + (default_port_seed % (PQI_MAX_PORT - PQI_MIN_PORT)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue