Use the best network interface to route an ip instead of the first interface in getLocalInterfaces on Windows.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6469 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-07-01 15:12:06 +00:00
parent 81874da2cc
commit af5c31a4f5
4 changed files with 57 additions and 16 deletions

View file

@ -905,7 +905,7 @@ bool p3NetMgrIMPL::checkNetAddress()
struct in_addr prefAddr;
struct sockaddr_in oldAddr;
validAddr = getPreferredInterface(prefAddr);
validAddr = getPreferredInterface(mLocalAddr.sin_addr, prefAddr);
/* if we don't have a valid address - reset */
if (!validAddr)