mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
Removed Lots of Debug, and fixed a couple of bugs.
* Increased Timeout Periods for UDP connections - this was stopping half of them from succeeding. * The other bug (Heartbeat / stream issues) has not been solved. * Fixed up initialisation of p3BitDht data. * add DropPeers() as NON-ACTIVE (this allows peers which aren't VISIBLE to still try and connect) * export AddFriends/FOF/Others to LinkMgr to allow further SSL IDs to be added to p3BitDht. * Export UDP Addresses to DhtWindow. * switch off lots of debugging. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4469 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e7049cc483
commit
cc9df9a80f
13 changed files with 370 additions and 190 deletions
|
@ -67,11 +67,13 @@ const int p3connectzone = 3431;
|
|||
* #define P3CONNMGR_NO_AUTO_CONNECTION 1
|
||||
***/
|
||||
|
||||
#define P3CONNMGR_NO_TCP_CONNECTIONS 1
|
||||
|
||||
const uint32_t P3CONNMGR_TCP_DEFAULT_DELAY = 3; /* 2 Seconds? is it be enough! */
|
||||
const uint32_t P3CONNMGR_UDP_DEFAULT_DELAY = 3; /* 2 Seconds? is it be enough! */
|
||||
|
||||
const uint32_t P3CONNMGR_TCP_DEFAULT_PERIOD = 10;
|
||||
const uint32_t P3CONNMGR_UDP_DEFAULT_PERIOD = 40;
|
||||
const uint32_t P3CONNMGR_UDP_DEFAULT_PERIOD = 30; // this represents how long it stays at the default TTL (4), before rising.
|
||||
|
||||
#define MAX_AVAIL_PERIOD 230 //times a peer stay in available state when not connected
|
||||
#define MIN_RETRY_PERIOD 140
|
||||
|
@ -1205,8 +1207,12 @@ void p3LinkMgrIMPL::peerConnectRequest(std::string id, struct sockaddr_in rad
|
|||
|
||||
if (source == RS_CB_DHT)
|
||||
{
|
||||
|
||||
if (flags & RS_CB_FLAG_MODE_TCP)
|
||||
{
|
||||
|
||||
#ifndef P3CONNMGR_NO_TCP_CONNECTIONS
|
||||
|
||||
#ifdef LINKMGR_DEBUG
|
||||
std::cerr << "p3LinkMgrIMPL::peerConnectRequest() DHT says Online ==> so try TCP";
|
||||
std::cerr << std::endl;
|
||||
|
@ -1235,6 +1241,9 @@ void p3LinkMgrIMPL::peerConnectRequest(std::string id, struct sockaddr_in rad
|
|||
}
|
||||
|
||||
retryConnect(id);
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue