Cleaned up More debugging and started work on connections.

* switched off lots of debugging, and removed "common" messages, so we can focus on the actions.
 * Added extra debugging focused on the connections.
 * Removed "lastconnect" from p3LinkMgr.
 * added p3PeerMgr::updateLastConnect() fn, so this parameter will be stored.
 * added calls from p3LinkMgr at connect and disconnect.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4424 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-07-11 00:52:12 +00:00
parent f7ff55237e
commit 81dc1d77b7
7 changed files with 78 additions and 17 deletions

View file

@ -21,7 +21,11 @@
#define PEERNET_CONNECT_TIMEOUT 45
#define DEBUG_BITDHT 1
/***
*
* #define DEBUG_BITDHT_COMMON 1 // These are the things that are called regularly (annoying for debugging specifics)
*
**/
#if 0
int p3BitDht::add_peer(std::string id)
@ -184,7 +188,7 @@ int p3BitDht::NodeCallback(const bdId *id, uint32_t peerflags)
if ((mProxyStunner) && (mProxyStunner->needStunPeers()))
{
#ifdef DEBUG_BITDHT
#ifdef DEBUG_BITDHT_COMMON
std::cerr << "p3BitDht::NodeCallback() Passing BitDHT Peer to DhtStunner: ";
bdStdPrintId(std::cerr, id);
std::cerr << std::endl;
@ -195,7 +199,7 @@ int p3BitDht::NodeCallback(const bdId *id, uint32_t peerflags)
if ((mDhtStunner) && (mDhtStunner->needStunPeers()))
{
#ifdef DEBUG_BITDHT
#ifdef DEBUG_BITDHT_COMMON
std::cerr << "p3BitDht::NodeCallback() Passing BitDHT Peer to DhtStunner: ";
bdStdPrintId(std::cerr, id);
std::cerr << std::endl;
@ -915,8 +919,10 @@ int p3BitDht::tick()
time_t now = time(NULL);
#ifdef PEERNET_DEBUG
std::cerr << "p3BitDht::tick() TIME: " << ctime(&now) << std::endl;
std::cerr.flush();
#endif
return 1;
}

View file

@ -40,8 +40,6 @@
*
**/
#define DEBUG_BITDHT 1
/******************************************************************************************
********************************* Existing Interface *************************************
******************************************************************************************/