mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Tweaks to debug connections.
* bool / int mismatch bug in tou_extaddr() * extra debugging to p3connmgr * fixed connect error in p3connmgr. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@342 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3e1b155f1a
commit
1bb4283986
4 changed files with 151 additions and 8 deletions
|
@ -638,6 +638,16 @@ struct in_addr getPreferredInterface() // returns best addr.
|
|||
|
||||
bool sameNet(struct in_addr *addr, struct in_addr *addr2)
|
||||
{
|
||||
std::cerr << "sameNet: " << inet_ntoa(*addr);
|
||||
std::cerr << " VS " << inet_ntoa(*addr2);
|
||||
std::cerr << std::endl;
|
||||
struct in_addr addrnet, addrnet2;
|
||||
|
||||
addrnet.s_addr = inet_netof(*addr);
|
||||
addrnet2.s_addr = inet_netof(*addr2);
|
||||
std::cerr << " (" << inet_ntoa(addrnet);
|
||||
std::cerr << " =?= " << inet_ntoa(addrnet2);
|
||||
std::cerr << ")" << std::endl;
|
||||
return (inet_netof(*addr) == inet_netof(*addr2));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue