From 6ac2cad4aa028db39364d4d06008080e6f95723b Mon Sep 17 00:00:00 2001 From: drbob Date: Fri, 20 Jan 2012 15:13:50 +0000 Subject: [PATCH] cleaned up some of the std::cerr output. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4824 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/p3linkmgr.cc | 2 ++ libretroshare/src/pqi/pqi_base.h | 5 +++++ libretroshare/src/pqi/pqiperson.cc | 4 +++- libretroshare/src/services/p3banlist.cc | 2 -- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/pqi/p3linkmgr.cc b/libretroshare/src/pqi/p3linkmgr.cc index a0ab08cf3..8ef5b761f 100644 --- a/libretroshare/src/pqi/p3linkmgr.cc +++ b/libretroshare/src/pqi/p3linkmgr.cc @@ -1757,10 +1757,12 @@ bool p3LinkMgrIMPL::locked_CheckPotentialAddr(const struct sockaddr_in *addr, t - check net against our local address. */ +#ifdef LINKMGR_DEBUG std::cerr << "p3LinkMgrIMPL::locked_CheckPotentialAddr() Checking sameNet against: "; std::cerr << rs_inet_ntoa(mLocalAddress.sin_addr); std::cerr << ")"; std::cerr << std::endl; +#endif if (sameNet(&(mLocalAddress.sin_addr), &(addr->sin_addr))) { diff --git a/libretroshare/src/pqi/pqi_base.h b/libretroshare/src/pqi/pqi_base.h index adc8b111c..0f5342d03 100644 --- a/libretroshare/src/pqi/pqi_base.h +++ b/libretroshare/src/pqi/pqi_base.h @@ -51,6 +51,7 @@ int fixme(char *str, int n); //! controlling data rates /*! * For controlling data rates. + * #define DEBUG_RATECAP 1 */ class RateInterface { @@ -110,13 +111,17 @@ virtual void setRateCap(float val_in, float val_out) { if ((val_in == 0) && (val_out == 0)) { +#ifdef DEBUG_RATECAP std::cerr << "RateInterface::setRateCap() Now disabled" << std::endl; +#endif bwCapEnabled = false; } else { +#ifdef DEBUG_RATECAP std::cerr << "RateInterface::setRateCap() Enabled "; std::cerr << "in: " << bwCap_in << " out: " << bwCap_out << std::endl; +#endif bwCapEnabled = true; bwCap_in = val_in; bwCap_out = val_out; diff --git a/libretroshare/src/pqi/pqiperson.cc b/libretroshare/src/pqi/pqiperson.cc index 07f00cddd..36b341288 100644 --- a/libretroshare/src/pqi/pqiperson.cc +++ b/libretroshare/src/pqi/pqiperson.cc @@ -463,14 +463,16 @@ int pqiperson::connect(uint32_t type, struct sockaddr_in raddr, return 0; } - std::cerr << "pqiperson::connect() WARNING, resetting for new connection attempt" << std::endl; #ifdef PERSON_DEBUG + std::cerr << "pqiperson::connect() WARNING, resetting for new connection attempt" << std::endl; #endif /* set the parameters */ pqioutput(PQL_WARNING, pqipersonzone, "pqiperson::connect reset() before connection attempt"); (it->second)->reset(); +#ifdef PERSON_DEBUG std::cerr << "pqiperson::connect() WARNING, clearing rate cap" << std::endl; +#endif setRateCap(0,0); #ifdef PERSON_DEBUG diff --git a/libretroshare/src/services/p3banlist.cc b/libretroshare/src/services/p3banlist.cc index cf8814426..de5d44541 100644 --- a/libretroshare/src/services/p3banlist.cc +++ b/libretroshare/src/services/p3banlist.cc @@ -37,8 +37,6 @@ * #define DEBUG_BANLIST 1 ****/ -#define DEBUG_BANLIST 1 - /* DEFINE INTERFACE POINTER! */ //RsBanList *rsBanList = NULL;