* 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

@ -62,6 +62,9 @@ UdpRelayReceiver::UdpRelayReceiver(UdpPublisher *pub)
}
setRelayTotal(UDP_RELAY_DEFAULT_COUNT_ALL);
setRelayClassMax(UDP_RELAY_CLASS_FRIENDS, UDP_RELAY_DEFAULT_FRIEND, UDP_RELAY_DEFAULT_BANDWIDTH);
setRelayClassMax(UDP_RELAY_CLASS_FOF, UDP_RELAY_DEFAULT_FOF, UDP_RELAY_DEFAULT_BANDWIDTH);
setRelayClassMax(UDP_RELAY_CLASS_GENERAL, UDP_RELAY_DEFAULT_GENERAL, UDP_RELAY_DEFAULT_BANDWIDTH);
/* only allocate this space once */
mTmpSendPkt = malloc(MAX_RELAY_UDP_PACKET_SIZE);

View file

@ -92,10 +92,17 @@ std::ostream &operator<<(std::ostream &out, const UdpRelayEnd &ure);
* 20 x 2 x 1Kb/s => 40Kb/s Huge.
*/
#define UDP_RELAY_DEFAULT_COUNT_ALL 10
#define UDP_RELAY_FRAC_GENERAL (0.2)
#define UDP_RELAY_DEFAULT_COUNT_ALL 2
#define UDP_RELAY_DEFAULT_FRIEND 0
#define UDP_RELAY_DEFAULT_FOF 1
#define UDP_RELAY_DEFAULT_GENERAL 1
#define UDP_RELAY_DEFAULT_BANDWIDTH 1024
#define UDP_RELAY_FRAC_GENERAL (0.5)
#define UDP_RELAY_FRAC_FOF (0.5)
#define UDP_RELAY_FRAC_FRIENDS (0.3)
#define UDP_RELAY_FRAC_FRIENDS (0.0)
/**** DEFINED IN EXTERNAL HEADER FILE ***/
#define UDP_RELAY_NUM_CLASS RSDHT_RELAY_NUM_CLASS