mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 17:09:34 -05:00
commit
5604220a06
@ -57,6 +57,7 @@ static struct RsLog::logInfo p3connectzoneInfo = {RsLog::Default, "p3connect"};
|
||||
|
||||
/****
|
||||
* #define LINKMGR_DEBUG 1
|
||||
* #define LINKMGR_DEBUG_LOG 1
|
||||
* #define LINKMGR_DEBUG_CONNFAIL 1
|
||||
* #define LINKMGR_DEBUG_ACTIONS 1
|
||||
* #define LINKMGR_DEBUG_LINKTYPE 1
|
||||
@ -621,7 +622,9 @@ bool p3LinkMgrIMPL::connectAttempt(const RsPeerId &id, struct sockaddr_storage &
|
||||
|
||||
}
|
||||
|
||||
#ifdef LINKMGR_DEBUG_LOG
|
||||
rslog(RSL_WARNING, p3connectzone, "p3LinkMgrIMPL::connectAttempt() called id: " + id.toStdString());
|
||||
#endif
|
||||
|
||||
it->second.lastattempt = time(NULL);
|
||||
it->second.inConnAttempt = true;
|
||||
@ -824,7 +827,9 @@ bool p3LinkMgrIMPL::connectResult(const RsPeerId &id, bool success, bool isIncom
|
||||
out += " FAILED ATTEMPT (Not Connected)";
|
||||
}
|
||||
}
|
||||
#ifdef LINKMGR_DEBUG_LOG
|
||||
rslog(RSL_WARNING, p3connectzone, out);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -2060,8 +2065,9 @@ bool p3LinkMgrIMPL::locked_ConnectAttempt_Complete(peerConnectState *peer)
|
||||
|
||||
int p3LinkMgrIMPL::addFriend(const RsPeerId &id, bool isVisible)
|
||||
{
|
||||
#ifdef LINKMGR_DEBUG_LOG
|
||||
rslog(RSL_WARNING, p3connectzone, "p3LinkMgr::addFriend() id: " + id.toStdString());
|
||||
|
||||
#endif
|
||||
{
|
||||
RsStackMutex stack(mLinkMtx); /****** STACK LOCK MUTEX *******/
|
||||
|
||||
|
@ -74,6 +74,7 @@ static struct RsLog::logInfo p3peermgrzoneInfo = {RsLog::Default, "p3peermgr"};
|
||||
|
||||
/****
|
||||
* #define PEER_DEBUG 1
|
||||
* #define PEER_DEBUG_LOG 1
|
||||
***/
|
||||
|
||||
#define MAX_AVAIL_PERIOD 230 //times a peer stay in available state when not connected
|
||||
@ -909,8 +910,9 @@ bool p3PeerMgrIMPL::addFriend(const RsPeerId& input_id, const RsPgpId& input_gpg
|
||||
RsPeerId id = input_id ;
|
||||
RsPgpId gpg_id = input_gpg_id ;
|
||||
|
||||
#ifdef PEER_DEBUG_LOG
|
||||
rslog(RSL_WARNING, p3peermgrzone, "p3PeerMgr::addFriend() id: " + id.toStdString());
|
||||
|
||||
#endif
|
||||
{
|
||||
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
||||
|
||||
|
@ -45,6 +45,7 @@ static std::list<RsPeerId> waitingIds;
|
||||
|
||||
/****
|
||||
*#define PGRP_DEBUG 1
|
||||
*#define PGRP_DEBUG_LOG 1
|
||||
****/
|
||||
|
||||
#define DEFAULT_DOWNLOAD_KB_RATE (200.0)
|
||||
@ -420,7 +421,9 @@ int pqipersongrp::addPeer(const RsPeerId& id)
|
||||
sm -> pqi = pqip;
|
||||
|
||||
// reset it to start it working.
|
||||
#ifdef PGRP_DEBUG_LOG
|
||||
pqioutput(PQL_WARNING, pqipersongrpzone, "pqipersongrp::addPeer() => reset() called to initialise new person");
|
||||
#endif
|
||||
pqip -> reset();
|
||||
pqip -> listen();
|
||||
|
||||
|
@ -67,7 +67,7 @@ const int PQISSL_UDP_FLAG = 0x02;
|
||||
|
||||
//#define PQISSL_DEBUG 1
|
||||
//#define PQISSL_LOG_DEBUG 1
|
||||
|
||||
//#define PQISSL_LOG_DEBUG2 1
|
||||
|
||||
static const int PQISSL_MAX_READ_ZERO_COUNT = 20;
|
||||
static const time_t PQISSL_MAX_READ_ZERO_TIME = 15; // 15 seconds of no data => reset. (atm HeartBeat pkt sent 5 secs)
|
||||
@ -238,7 +238,9 @@ int pqissl::reset_locked()
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PQISSL_LOG_DEBUG2
|
||||
rslog(RSL_ALERT, pqisslzone, outLog);
|
||||
#endif
|
||||
|
||||
// notify people of problem!
|
||||
// but only if we really shut something down.
|
||||
@ -775,10 +777,14 @@ bool pqissl::CheckConnectionTimeout()
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqissl::Basic_Connection_Complete() Connection Timed Out. Peer: %s Period: %lu", PeerId().toStdString().c_str(), mConnectTimeout);
|
||||
|
||||
#ifdef PQISSL_LOG_DEBUG2
|
||||
rslog(RSL_WARNING, pqisslzone, out);
|
||||
#endif
|
||||
/* as sockfd is valid, this should close it all up */
|
||||
|
||||
#ifdef PQISSL_LOG_DEBUG2
|
||||
rslog(RSL_ALERT, pqisslzone, "pqissl::Basic_Connection_Complete() -> calling reset()");
|
||||
#endif
|
||||
reset_locked();
|
||||
return true;
|
||||
}
|
||||
@ -917,7 +923,9 @@ int pqissl::Basic_Connection_Complete()
|
||||
{
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqissl::Basic_Connection_Complete() TCP Connection Complete: cert: %s on osock: ", PeerId().toStdString().c_str(), sockfd);
|
||||
#ifdef PQISSL_LOG_DEBUG2
|
||||
rslog(RSL_WARNING, pqisslzone, out);
|
||||
#endif
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ static struct RsLog::logInfo pqisslproxyzoneInfo = {RsLog::Default, "pqisslproxy
|
||||
#define pqisslproxyzone &pqisslproxyzoneInfo
|
||||
|
||||
// #define PROXY_DEBUG 1
|
||||
// #define PROXY_DEBUG_LOG 1
|
||||
|
||||
#define PROXY_STATE_FAILED 0
|
||||
#define PROXY_STATE_INIT 1
|
||||
@ -593,8 +594,9 @@ bool pqisslproxy::connect_parameter(uint32_t type, const std::string &value)
|
||||
{
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqisslproxy::connect_parameter() Peer: %s DOMAIN_ADDRESS: %s", PeerId().toStdString().c_str(), value.c_str());
|
||||
#ifdef PROXY_DEBUG_LOG
|
||||
rslog(RSL_WARNING, pqisslproxyzone, out);
|
||||
|
||||
#endif
|
||||
mDomainAddress = value;
|
||||
#ifdef PROXY_DEBUG
|
||||
std::cerr << out << std::endl;
|
||||
@ -615,8 +617,9 @@ bool pqisslproxy::connect_parameter(uint32_t type, uint32_t value)
|
||||
{
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqisslproxy::connect_parameter() Peer: %s REMOTE_PORT: %lu", PeerId().toStdString().c_str(), value);
|
||||
#ifdef PROXY_DEBUG_LOG
|
||||
rslog(RSL_WARNING, pqisslproxyzone, out);
|
||||
|
||||
#endif
|
||||
mRemotePort = value;
|
||||
#ifdef PROXY_DEBUG
|
||||
std::cerr << out << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user