* Enabled Relays by default.

- This will only effect people who upgrade from a very old version.
 	- Other people will have to switch it on manually.
	- Default is 0 friends, 1 FOF & 1 General @ 1kb/s... max 4kb/s usage per peer.
 * Switched off lots of debugging.
 * Bugfix for natassist (zeroconf returns 0.0.0.0:0 when its doesn't work).
 * Logged IP Addresses for Failed incoming connections.
 * Hacked IP address into the NewsFeed notifications (ugly).



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4827 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-01-20 17:50:19 +00:00
parent f08bcc153e
commit 87944f251e
11 changed files with 69 additions and 25 deletions

View file

@ -148,9 +148,10 @@ bool p3BitDht::dropPeer(std::string pid)
DhtPeerDetails *dpd = findInternalRsPeer_locked(pid);
if (!dpd)
{
/* ERROR */
#ifdef DEBUG_BITDHT
std::cerr << "p3BitDht::dropPeer(" << pid << ") HACK TO INCLUDE FRIEND AS NON-ACTIVE PEER";
std::cerr << std::endl;
#endif
//addFriend(pid);
dpd = addInternalPeer_locked(pid, RSDHT_PEERTYPE_FOF);
@ -551,26 +552,26 @@ int p3BitDht::lookupRsId_locked(const bdNodeId *id, std::string &pid)
int p3BitDht::storeTranslation_locked(const std::string pid)
{
#ifdef DEBUG_BITDHT_TRANSLATE
std::cerr << "p3BitDht::storeTranslation_locked(" << pid << ")";
std::cerr << std::endl;
#ifdef DEBUG_BITDHT_TRANSLATE
#endif
bdNodeId nid;
calculateNodeId(pid, &nid);
#ifdef DEBUG_BITDHT_TRANSLATE
std::cerr << "p3BitDht::storeTranslation_locked() Converts to NodeId: ";
bdStdPrintNodeId(std::cerr, &(nid));
std::cerr << std::endl;
#ifdef DEBUG_BITDHT_TRANSLATE
#endif
mTransToNodeId[pid] = nid;
mTransToRsId[nid] = pid;
#ifdef DEBUG_BITDHT_TRANSLATE
std::cerr << "p3BitDht::storeTranslation_locked() Success";
std::cerr << std::endl;
#ifdef DEBUG_BITDHT_TRANSLATE
#endif
return 1;

View file

@ -38,8 +38,7 @@
int p3BitDht::setupRelayDefaults()
{
//uint32_t mode = RSDHT_RELAY_ENABLED | RSDHT_RELAY_MODE_OFF;
uint32_t mode = RSDHT_RELAY_MODE_OFF;
uint32_t mode = RSDHT_RELAY_ENABLED | RSDHT_RELAY_MODE_OFF;
setRelayMode(mode);
return 1;