Added Further debugging to try and catch this 10minute reset bug.

* log p3disc::sendHeartbeat(), successful  p3linkmgr::connectAttempt()
 * log reason for each pqissl::reset().
 * log linkmgr & peermgr  addFriend() and removeFriend().
 * log pqiperson::connect(), p3PeerMgr::cleanUnusedLocations().
 * Modify timing of cleanUnusedLocations (=>8min) & NETSTATE_PARAM_TIMEOUT (=>15min) (see if it has an effect).



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4539 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-08-06 12:27:23 +00:00
parent d870412523
commit aa63ca1aa6
7 changed files with 61 additions and 15 deletions

View file

@ -37,8 +37,8 @@
//#include "util/dnsresolver.h"
#include "util/rsprint.h"
//#include "util/rsdebug.h"
//const int p3connectzone = 3431;
#include "util/rsdebug.h"
const int p3peermgrzone = 9531;
#include "serialiser/rsconfigitems.h"
#include "pqi/pqinotify.h"
@ -177,7 +177,8 @@ void p3PeerMgrIMPL::tick()
{
static time_t last_friends_check = time(NULL) ;
static const time_t INTERVAL_BETWEEN_LOCATION_CLEANING = 600 ; // Remove unused locations every 10 minutes.
//static const time_t INTERVAL_BETWEEN_LOCATION_CLEANING = 600 ; // Remove unused locations every 10 minutes.
static const time_t INTERVAL_BETWEEN_LOCATION_CLEANING = 480 ; // Switch to 8 minutes -> see if it changes
time_t now = time(NULL) ;
@ -185,6 +186,8 @@ void p3PeerMgrIMPL::tick()
{
std::cerr << "p3PeerMgrIMPL::tick(): cleaning unused locations." << std::endl ;
rslog(RSL_WARNING, p3peermgrzone, "p3PeerMgr::tick() cleanUnusedLocations()");
rsPeers->cleanUnusedLocations() ;
last_friends_check = now ;
}
@ -354,6 +357,10 @@ bool p3PeerMgrIMPL::haveOnceConnected()
bool p3PeerMgrIMPL::addFriend(const std::string &id, const std::string &gpg_id, uint32_t netMode, uint32_t visState, time_t lastContact)
{
bool notifyLinkMgr = false;
rslog(RSL_WARNING, p3peermgrzone, "p3PeerMgr::addFriend() id: " + id);
{
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
@ -472,6 +479,8 @@ bool p3PeerMgrIMPL::removeFriend(const std::string &id)
std::cerr << "p3PeerMgrIMPL::removeFriend() mFriendList.size() : " << mFriendList.size() << std::endl;
#endif
rslog(RSL_WARNING, p3peermgrzone, "p3PeerMgr::removeFriend() id: " + id);
std::list<std::string> toRemove; // This is a list of SSLIds.
{