* Moved Relay Packet Debug to a seperate #define.

* Improved Relay Status Output & print when checkRelay() is called.
 * initialise timer variable (mMinuteTS) - was causing checkRelay to never be called.
 * switched to 10 second calling of checkRelay().
 * Increased RELAY lifetimes (x2). now GENERAL = 1 hr, so they can at least transfer 1 meg (minimum block size)
 


git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4777 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-01-10 23:28:33 +00:00
parent f20ac8630e
commit ec05a7cc7d
4 changed files with 72 additions and 24 deletions

View file

@ -96,6 +96,8 @@ p3BitDht::p3BitDht(std::string id, pqiConnectCb *cb, p3NetMgr *nm,
std::string dhtVersion = "RS51"; // should come from elsewhere!
mOwnRsId = id;
mMinuteTS = 0;
#ifdef DEBUG_BITDHT
std::cerr << "p3BitDht::p3BitDht()" << std::endl;
std::cerr << "Using Id: " << id;

View file

@ -1089,6 +1089,7 @@ int p3BitDht::tick()
}
#define MINUTE_IN_SECS 60
#define TEN_IN_SECS 10
int p3BitDht::minuteTick()
{
@ -1100,7 +1101,8 @@ int p3BitDht::minuteTick()
deltaT = now-mMinuteTS;
}
if (deltaT > MINUTE_IN_SECS)
//if (deltaT > MINUTE_IN_SECS)
if (deltaT > TEN_IN_SECS)
{
mRelay->checkRelays();