mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
Reversed Changes for Testing Purposes.
* Disabled lots of debugging. * Disabled LOCAL test mode in udpstunner, rsinit * Enabled BadPeer checking in bitdht. * Restored normal timeout periods for connection attempts. * Restored normal connection levels for dht status. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4779 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e0dcca8d13
commit
9e5e07d3f0
@ -35,13 +35,15 @@
|
|||||||
#include "util/bdrandom.h"
|
#include "util/bdrandom.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* #define DEBUG_PROXY_CONNECTION 1
|
||||||
* #define DEBUG_NODE_CONNECTION 1
|
* #define DEBUG_NODE_CONNECTION 1
|
||||||
* #define DEBUG_NODE_CONNECTION_EXTRA 1
|
* #define DEBUG_NODE_CONNECTION_EXTRA 1
|
||||||
* #define DEBUG_CONNECTION_DELAY 1
|
* #define DEBUG_CONNECTION_DELAY 1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DEBUG_NODE_CONNECTION 1
|
//#define DEBUG_PROXY_CONNECTION 1
|
||||||
#define DEBUG_CONNECTION_DELAY 1
|
//#define DEBUG_NODE_CONNECTION 1
|
||||||
|
//#define DEBUG_CONNECTION_DELAY 1
|
||||||
|
|
||||||
|
|
||||||
#define BITDHT_CR_PAUSE_SHORT_PERIOD 1
|
#define BITDHT_CR_PAUSE_SHORT_PERIOD 1
|
||||||
|
@ -312,11 +312,11 @@ void bdNodeManager::iteration()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define TRANSITION_OP_SPACE_SIZE 50 /* 1 query / sec, should take 12-15 secs */
|
#define TRANSITION_OP_SPACE_SIZE 50 /* 1 query / sec, should take 12-15 secs */
|
||||||
//#define MAX_FINDSELF_TIME 30
|
#define MAX_FINDSELF_TIME 30
|
||||||
//#define MIN_OP_SPACE_SIZE 10
|
#define MIN_OP_SPACE_SIZE 10
|
||||||
// testing parameters.
|
// testing parameters.
|
||||||
#define MAX_FINDSELF_TIME 10
|
//#define MAX_FINDSELF_TIME 10
|
||||||
#define MIN_OP_SPACE_SIZE 2 // for testing. self + oneother.
|
//#define MIN_OP_SPACE_SIZE 2 // for testing. self + oneother.
|
||||||
|
|
||||||
{
|
{
|
||||||
uint32_t nodeSpaceSize = mNodeSpace.calcSpaceSize();
|
uint32_t nodeSpaceSize = mNodeSpace.calcSpaceSize();
|
||||||
@ -403,8 +403,7 @@ void bdNodeManager::iteration()
|
|||||||
/* run a random search for ourselves, from own App DHT peer */
|
/* run a random search for ourselves, from own App DHT peer */
|
||||||
QueryRandomLocalNet();
|
QueryRandomLocalNet();
|
||||||
|
|
||||||
//#define SEARCH_MAX_SIZE 10
|
#define SEARCH_MAX_SIZE 10
|
||||||
#define SEARCH_MAX_SIZE 0
|
|
||||||
if (mBdNetworkSize < SEARCH_MAX_SIZE)
|
if (mBdNetworkSize < SEARCH_MAX_SIZE)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_MGR
|
#ifdef DEBUG_MGR
|
||||||
|
@ -60,9 +60,12 @@
|
|||||||
|
|
||||||
* #define DEBUG_NODE_MSGIN 1
|
* #define DEBUG_NODE_MSGIN 1
|
||||||
* #define DEBUG_NODE_MSGOUT 1
|
* #define DEBUG_NODE_MSGOUT 1
|
||||||
|
*
|
||||||
|
* #define DISABLE_BAD_PEER_FILTER 1
|
||||||
|
*
|
||||||
***/
|
***/
|
||||||
|
|
||||||
//#define DEBUG_NODE_MSGS 1
|
//#define DISABLE_BAD_PEER_FILTER 1
|
||||||
|
|
||||||
|
|
||||||
bdNode::bdNode(bdNodeId *ownId, std::string dhtVersion, std::string bootfile, bdDhtFunctions *fns)
|
bdNode::bdNode(bdNodeId *ownId, std::string dhtVersion, std::string bootfile, bdDhtFunctions *fns)
|
||||||
@ -461,9 +464,6 @@ void bdNode::send_connect_msg(bdId *id, int msgtype, bdId *srcAddr, bdId *destAd
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DISABLE_BAD_PEER_FILTER 1
|
|
||||||
|
|
||||||
void bdNode::checkPotentialPeer(bdId *id, bdId *src)
|
void bdNode::checkPotentialPeer(bdId *id, bdId *src)
|
||||||
{
|
{
|
||||||
/* Check BadPeer Filters for Potential Peers too */
|
/* Check BadPeer Filters for Potential Peers too */
|
||||||
|
@ -38,8 +38,6 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#define TESTING_PERIODS 1
|
|
||||||
#define DEBUG_CONNECTBOX 1
|
|
||||||
|
|
||||||
/* Have made the PROXY Attempts + MAX_TIME much larger,
|
/* Have made the PROXY Attempts + MAX_TIME much larger,
|
||||||
* have have potential for this to take a while.
|
* have have potential for this to take a while.
|
||||||
|
@ -31,9 +31,6 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#define DEBUG_PEERNET 1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************************
|
/******************************************************************************************
|
||||||
************************************* Dht Callback ***************************************
|
************************************* Dht Callback ***************************************
|
||||||
|
@ -315,9 +315,11 @@ void RsInit::InitRsConfig()
|
|||||||
|
|
||||||
/********
|
/********
|
||||||
* LOCALNET_TESTING - allows port restrictions
|
* LOCALNET_TESTING - allows port restrictions
|
||||||
|
*
|
||||||
|
* #define LOCALNET_TESTING 1
|
||||||
|
*
|
||||||
********/
|
********/
|
||||||
|
|
||||||
#define LOCALNET_TESTING 1
|
|
||||||
|
|
||||||
#ifdef LOCALNET_TESTING
|
#ifdef LOCALNET_TESTING
|
||||||
|
|
||||||
@ -2027,10 +2029,14 @@ int RsServer::StartupRetroShare()
|
|||||||
|
|
||||||
struct sockaddr_in sndladdr;
|
struct sockaddr_in sndladdr;
|
||||||
sockaddr_clear(&sndladdr);
|
sockaddr_clear(&sndladdr);
|
||||||
//uint16_t rndport = MIN_RANDOM_PORT + RSRandom::random_u32() % (MAX_RANDOM_PORT - MIN_RANDOM_PORT);
|
|
||||||
|
#ifdef LOCALNET_TESTING
|
||||||
// HACK Proxy Port near Dht Port - For Relay Testing.
|
// HACK Proxy Port near Dht Port - For Relay Testing.
|
||||||
uint16_t rndport = RsInitConfig::port + 3;
|
uint16_t rndport = RsInitConfig::port + 3;
|
||||||
sndladdr.sin_port = htons(rndport);
|
sndladdr.sin_port = htons(rndport);
|
||||||
|
#else
|
||||||
|
uint16_t rndport = MIN_RANDOM_PORT + RSRandom::random_u32() % (MAX_RANDOM_PORT - MIN_RANDOM_PORT);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef LOCALNET_TESTING
|
#ifdef LOCALNET_TESTING
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
* #define DEBUG_UDP_RELAY_PKTS 1
|
* #define DEBUG_UDP_RELAY_PKTS 1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DEBUG_UDP_RELAY 1
|
//#define DEBUG_UDP_RELAY 1
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_UDP_RELAY
|
#ifdef DEBUG_UDP_RELAY
|
||||||
|
@ -72,8 +72,6 @@ class TouStunPeer
|
|||||||
* #define UDPSTUN_ALLOW_LOCALNET 1
|
* #define UDPSTUN_ALLOW_LOCALNET 1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define UDPSTUN_ALLOW_LOCALNET 1
|
|
||||||
|
|
||||||
class UdpStunner: public UdpSubReceiver
|
class UdpStunner: public UdpSubReceiver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user