Incremental DHT improvement - support in libretroshare.

- Added missing Mutex protection in p3BitDht.
	- Added p3BitDht::addKnownPeer() to communicate with libbitdht.
	- Disabled placeholder versions (addFriend/AddFriendOfFriend)
	- Added netAssistKnownPeer() libretroshare interface.
	- Added calls to netAssistKnownPeer() from p3disc and p3NetMgr.
	- Check for NULL ptr in p3NetMgr before calling p3PeerMgr.
	- Added FIX to maintain MANUAL FORWARD port (untested!)
	- Removed some compiler warnings.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4681 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-11-22 13:24:42 +00:00
parent 4cd7523947
commit 7b0a33c318
12 changed files with 254 additions and 74 deletions

View file

@ -877,7 +877,10 @@ bool p3LinkMgrIMPL::connectResult(const std::string &id, bool success, uint32_t
std::cerr << std::endl;
#endif
/* always switch it off now */
mNetMgr->netAssistFriend(id,false) ;
mNetMgr->netAssistFriend(id,false);
/* inform NetMgr that we know this peers address */
mNetMgr->netAssistKnownPeer(id,remote_peer_address, NETASSIST_KNOWN_PEER_FRIEND | NETASSIST_KNOWN_PEER_ONLINE);
}
else
{
@ -896,6 +899,9 @@ bool p3LinkMgrIMPL::connectResult(const std::string &id, bool success, uint32_t
std::cerr << std::endl;
#endif
}
/* inform NetMgr that this peer is offline */
mNetMgr->netAssistKnownPeer(id,remote_peer_address, NETASSIST_KNOWN_PEER_FRIEND | NETASSIST_KNOWN_PEER_OFFLINE);
}
return success;