From 1bc289275368d854f65952755cfae9ced5e47efe Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 30 Oct 2015 21:11:44 -0400 Subject: [PATCH] removed some debug info --- libretroshare/src/chat/distributedchat.cc | 4 ++++ libretroshare/src/grouter/groutermatrix.cc | 2 +- libretroshare/src/gxs/rsgenexchange.cc | 2 ++ libretroshare/src/gxs/rsgxsnetservice.cc | 8 ++++++++ retroshare-gui/src/gui/RetroShareLink.cpp | 2 ++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/chat/distributedchat.cc b/libretroshare/src/chat/distributedchat.cc index 76c98d594..72a3f2a93 100644 --- a/libretroshare/src/chat/distributedchat.cc +++ b/libretroshare/src/chat/distributedchat.cc @@ -171,7 +171,9 @@ bool DistributedChatService::handleRecvChatLobbyMsgItem(RsChatMsgItem *ci) if(!rsIdentity->getIdDetails(cli->signature.keyId,details)) { +#ifdef DEBUG_CHAT_LOBBIES std::cerr << "(WW) cannot get ID " << cli->signature.keyId << " for checking signature of lobby item." << std::endl; +#endif return false; } @@ -680,7 +682,9 @@ void DistributedChatService::handleRecvChatLobbyEventItem(RsChatLobbyEventItem * if(!rsIdentity->getIdDetails(item->signature.keyId,details)) { +#ifdef DEBUG_CHAT_LOBBIES std::cerr << "(WW) cannot get ID " << item->signature.keyId << " for checking signature of lobby item." << std::endl; +#endif return ; } diff --git a/libretroshare/src/grouter/groutermatrix.cc b/libretroshare/src/grouter/groutermatrix.cc index 4da0d02ed..a6bb063cf 100644 --- a/libretroshare/src/grouter/groutermatrix.cc +++ b/libretroshare/src/grouter/groutermatrix.cc @@ -27,7 +27,7 @@ #include "groutermatrix.h" #include "grouteritems.h" -#define ROUTING_MATRIX_DEBUG +//#define ROUTING_MATRIX_DEBUG GRouterMatrix::GRouterMatrix() { diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 70d52eb68..f803ae589 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -924,8 +924,10 @@ int RsGenExchange::validateMsg(RsNxsMsg *msg, const uint32_t& grpFlag, const uin #endif idValidate = false ; } +#ifdef GEN_EXCH_DEBUG else std::cerr << "RsGenExchange::validateMsg(): message from " << metaData.mAuthorId << ", accepted. Reputation score (" << details.mReputation.mOverallReputationScore <<") is above accepted threshold (" << reputation_threshold << ")" << std::endl; +#endif } } diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index 64fe31f76..63224a206 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -2000,7 +2000,9 @@ void RsGxsNetService::locked_genReqMsgTransaction(NxsTransaction* tr) if(rsReputations->isIdentityBanned(syncItem->authorId)) { +#ifdef NXS_NET_DEBUG std::cerr << ", Identity " << syncItem->authorId << " is banned. Not requesting message!" << std::endl; +#endif continue ; } @@ -2220,7 +2222,9 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr) if(!grpSyncItem->authorId.isNull() && rsReputations->isIdentityBanned(grpSyncItem->authorId)) { +#ifdef NXS_NET_DEBUG std::cerr << " Identity " << grpSyncItem->authorId << " is banned. Not syncing group." << std::endl; +#endif continue ; } @@ -2241,10 +2245,14 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr) if(rep.score >= GIXS_CUT_OFF) { addGroupItemToList(tr, grpId, transN, reqList); +#ifdef NXS_NET_DEBUG std::cerr << " reputation cut off: limit=" << GIXS_CUT_OFF << " value=" << rep.score << ": allowed." << std::endl; +#endif } +#ifdef NXS_NET_DEBUG else std::cerr << " reputation cut off: limit=" << GIXS_CUT_OFF << " value=" << rep.score << ": you shall not pass." << std::endl; +#endif } else { diff --git a/retroshare-gui/src/gui/RetroShareLink.cpp b/retroshare-gui/src/gui/RetroShareLink.cpp index 702b73369..5754d5831 100644 --- a/retroshare-gui/src/gui/RetroShareLink.cpp +++ b/retroshare-gui/src/gui/RetroShareLink.cpp @@ -195,7 +195,9 @@ void RetroShareLink::fromUrl(const QUrl& url) if (url.scheme() != RSLINK_SCHEME) { /* No RetroShare-Link */ +#ifdef DEBUG_RSLINK std::cerr << "Not a RS link: scheme=" << url.scheme().toStdString() << std::endl; +#endif return; }