diff --git a/libbitdht/src/bitdht/bdconnection.cc b/libbitdht/src/bitdht/bdconnection.cc index 0e68e477e..2329c7823 100644 --- a/libbitdht/src/bitdht/bdconnection.cc +++ b/libbitdht/src/bitdht/bdconnection.cc @@ -35,13 +35,15 @@ #include "util/bdrandom.h" /* + * #define DEBUG_PROXY_CONNECTION 1 * #define DEBUG_NODE_CONNECTION 1 * #define DEBUG_NODE_CONNECTION_EXTRA 1 * #define DEBUG_CONNECTION_DELAY 1 */ -#define DEBUG_NODE_CONNECTION 1 -#define DEBUG_CONNECTION_DELAY 1 +//#define DEBUG_PROXY_CONNECTION 1 +//#define DEBUG_NODE_CONNECTION 1 +//#define DEBUG_CONNECTION_DELAY 1 #define BITDHT_CR_PAUSE_SHORT_PERIOD 1 diff --git a/libbitdht/src/bitdht/bdmanager.cc b/libbitdht/src/bitdht/bdmanager.cc index a44c35679..e0bb28bec 100644 --- a/libbitdht/src/bitdht/bdmanager.cc +++ b/libbitdht/src/bitdht/bdmanager.cc @@ -312,11 +312,11 @@ void bdNodeManager::iteration() */ #define TRANSITION_OP_SPACE_SIZE 50 /* 1 query / sec, should take 12-15 secs */ -//#define MAX_FINDSELF_TIME 30 -//#define MIN_OP_SPACE_SIZE 10 +#define MAX_FINDSELF_TIME 30 +#define MIN_OP_SPACE_SIZE 10 // testing parameters. -#define MAX_FINDSELF_TIME 10 -#define MIN_OP_SPACE_SIZE 2 // for testing. self + oneother. +//#define MAX_FINDSELF_TIME 10 +//#define MIN_OP_SPACE_SIZE 2 // for testing. self + oneother. { uint32_t nodeSpaceSize = mNodeSpace.calcSpaceSize(); @@ -403,8 +403,7 @@ void bdNodeManager::iteration() /* run a random search for ourselves, from own App DHT peer */ QueryRandomLocalNet(); -//#define SEARCH_MAX_SIZE 10 -#define SEARCH_MAX_SIZE 0 +#define SEARCH_MAX_SIZE 10 if (mBdNetworkSize < SEARCH_MAX_SIZE) { #ifdef DEBUG_MGR diff --git a/libbitdht/src/bitdht/bdnode.cc b/libbitdht/src/bitdht/bdnode.cc index 42134950c..758cb89ed 100644 --- a/libbitdht/src/bitdht/bdnode.cc +++ b/libbitdht/src/bitdht/bdnode.cc @@ -60,9 +60,12 @@ * #define DEBUG_NODE_MSGIN 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) @@ -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) { /* Check BadPeer Filters for Potential Peers too */ diff --git a/libretroshare/src/dht/connectstatebox.cc b/libretroshare/src/dht/connectstatebox.cc index 38e14e492..d2fa72319 100644 --- a/libretroshare/src/dht/connectstatebox.cc +++ b/libretroshare/src/dht/connectstatebox.cc @@ -38,8 +38,6 @@ * **/ -#define TESTING_PERIODS 1 -#define DEBUG_CONNECTBOX 1 /* Have made the PROXY Attempts + MAX_TIME much larger, * have have potential for this to take a while. diff --git a/libretroshare/src/dht/p3bitdht_peernet.cc b/libretroshare/src/dht/p3bitdht_peernet.cc index 86e87e6d4..1ec63604e 100644 --- a/libretroshare/src/dht/p3bitdht_peernet.cc +++ b/libretroshare/src/dht/p3bitdht_peernet.cc @@ -31,9 +31,6 @@ * **/ -#define DEBUG_PEERNET 1 - - /****************************************************************************************** ************************************* Dht Callback *************************************** diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index aef4d3b34..bcd909ebd 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -315,9 +315,11 @@ void RsInit::InitRsConfig() /******** * LOCALNET_TESTING - allows port restrictions + * + * #define LOCALNET_TESTING 1 + * ********/ -#define LOCALNET_TESTING 1 #ifdef LOCALNET_TESTING @@ -2027,10 +2029,14 @@ int RsServer::StartupRetroShare() struct sockaddr_in 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. uint16_t rndport = RsInitConfig::port + 3; 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 diff --git a/libretroshare/src/tcponudp/udprelay.cc b/libretroshare/src/tcponudp/udprelay.cc index 064cd5ef6..908787330 100644 --- a/libretroshare/src/tcponudp/udprelay.cc +++ b/libretroshare/src/tcponudp/udprelay.cc @@ -31,7 +31,7 @@ * #define DEBUG_UDP_RELAY_PKTS 1 */ -#define DEBUG_UDP_RELAY 1 +//#define DEBUG_UDP_RELAY 1 #ifdef DEBUG_UDP_RELAY diff --git a/libretroshare/src/tcponudp/udpstunner.h b/libretroshare/src/tcponudp/udpstunner.h index 9d9f7b40a..74b07b517 100644 --- a/libretroshare/src/tcponudp/udpstunner.h +++ b/libretroshare/src/tcponudp/udpstunner.h @@ -72,8 +72,6 @@ class TouStunPeer * #define UDPSTUN_ALLOW_LOCALNET 1 */ -#define UDPSTUN_ALLOW_LOCALNET 1 - class UdpStunner: public UdpSubReceiver { public: