mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
log shut up
This commit is contained in:
parent
4be73b7049
commit
0a943ea9ee
@ -56,6 +56,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
|
||||
@ -620,7 +621,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;
|
||||
@ -823,7 +826,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
|
||||
}
|
||||
|
||||
|
||||
@ -2057,8 +2062,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 *******/
|
||||
|
||||
|
@ -69,6 +69,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
|
||||
@ -910,8 +911,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();
|
||||
|
||||
|
@ -61,6 +61,7 @@ static struct RsLog::logInfo pqisslzoneInfo = {RsLog::Default, "pqisslzone"};
|
||||
|
||||
#define PQISSL_DEBUG 1
|
||||
#define PQISSL_LOG_DEBUG 1
|
||||
#define PQISSL_LOG_DEBUG2 1
|
||||
|
||||
const int PQISSL_LOCAL_FLAG = 0x01;
|
||||
const int PQISSL_REMOTE_FLAG = 0x02;
|
||||
@ -269,7 +270,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.
|
||||
@ -678,7 +681,9 @@ int pqissl::Initiate_Connection()
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqissl::Initiate_Connection() Connecting To: %s via: ", PeerId().toStdString().c_str());
|
||||
out += sockaddr_storage_tostring(addr);
|
||||
#ifdef PQISSL_LOG_DEBUG2
|
||||
rslog(RSL_WARNING, pqisslzone, out);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (sockaddr_storage_isnull(addr))
|
||||
@ -832,10 +837,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;
|
||||
}
|
||||
@ -974,7 +983,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