mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-24 08:41:26 -04:00
Improved logging of Connection Behaviours.
- Hid lots of DEBUG_BASIC behind #defines in pqissl. - Added PeerID() in many places, so grep for a single peer. - fixed linkMgr output so we can tell a FAILURE vs FAILED ATTEMPT - reduced most logging to a single line. - print out of errno in HumanText for SSL errors. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4814 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3a271abf11
commit
8a86c980fc
5 changed files with 284 additions and 112 deletions
|
@ -222,8 +222,12 @@ int pqiperson::notifyEvent(NetInterface *ni, int newState)
|
|||
|
||||
if ((active) && (activepqi != pqi)) // already connected - trouble
|
||||
{
|
||||
pqioutput(PQL_WARNING, pqipersonzone,
|
||||
"CONNECT_SUCCESS+active-> activing new connection, shutting others");
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "pqiperson::notifyEvent() Id: " << PeerId();
|
||||
out << " CONNECT_SUCCESS+active-> activing new connection, shutting others";
|
||||
pqioutput(PQL_WARNING, pqipersonzone, out.str());
|
||||
}
|
||||
|
||||
// This is the RESET that's killing the connections.....
|
||||
//activepqi -> reset();
|
||||
|
@ -235,8 +239,13 @@ int pqiperson::notifyEvent(NetInterface *ni, int newState)
|
|||
/* now install a new one. */
|
||||
{
|
||||
|
||||
pqioutput(PQL_WARNING, pqipersonzone,
|
||||
"CONNECT_SUCCESS->marking so! (resetting others)");
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "pqiperson::notifyEvent() Id: " << PeerId();
|
||||
out << " CONNECT_SUCCESS->marking so! (resetting others)";
|
||||
pqioutput(PQL_WARNING, pqipersonzone, out.str());
|
||||
}
|
||||
|
||||
// mark as active.
|
||||
active = true;
|
||||
lastHeartbeatReceived = 0;
|
||||
|
@ -268,20 +277,34 @@ int pqiperson::notifyEvent(NetInterface *ni, int newState)
|
|||
{
|
||||
if (activepqi == pqi)
|
||||
{
|
||||
pqioutput(PQL_WARNING, pqipersonzone,
|
||||
"CONNECT_FAILED->marking so!");
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "pqiperson::notifyEvent() Id: " << PeerId();
|
||||
out << " CONNECT_FAILED->marking so!";
|
||||
pqioutput(PQL_WARNING, pqipersonzone, out.str());
|
||||
}
|
||||
|
||||
active = false;
|
||||
activepqi = NULL;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
pqioutput(PQL_WARNING, pqipersonzone,
|
||||
"CONNECT_FAILED-> from an unactive connection, don't flag the peer as not connected, just try next attempt !");
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "pqiperson::notifyEvent() Id: " << PeerId();
|
||||
out << " CONNECT_FAILED-> from an unactive connection, don't flag the peer as not connected, just try next attempt !";
|
||||
pqioutput(PQL_WARNING, pqipersonzone, out.str());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pqioutput(PQL_WARNING, pqipersonzone,
|
||||
"CONNECT_FAILED+NOT active -> try connect again");
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << "pqiperson::notifyEvent() Id: " << PeerId();
|
||||
out << " CONNECT_FAILED+NOT active -> try connect again";
|
||||
pqioutput(PQL_WARNING, pqipersonzone, out.str());
|
||||
}
|
||||
}
|
||||
|
||||
/* notify up */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue