From d65adeb2ea2bc9111e499a796e92e8d8679c0dae Mon Sep 17 00:00:00 2001 From: electron128 Date: Fri, 27 Mar 2015 18:41:44 +0000 Subject: [PATCH] disabled debug print of DHT requests, disabled debug print in p3Peers::getProxyServer(), added missing newlines in debug prints (modified patch from Hypfer) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8084 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libbitdht/src/bitdht/bdnode.cc | 2 +- libretroshare/src/pqi/pqiservice.cc | 2 +- libretroshare/src/rsserver/p3peers.cc | 6 ++++-- retroshare-gui/src/util/HandleRichText.cpp | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/libbitdht/src/bitdht/bdnode.cc b/libbitdht/src/bitdht/bdnode.cc index 57ae68b84..a00ffc9cb 100644 --- a/libbitdht/src/bitdht/bdnode.cc +++ b/libbitdht/src/bitdht/bdnode.cc @@ -766,9 +766,9 @@ void bdNode::processRemoteQuery() std::cerr << "bdNode::processRemoteQuery() Query Too Old: Discarding: "; } #endif +#ifdef DEBUG_NODE_MSGS mFns->bdPrintId(std::cerr, &(query.mId)); std::cerr << std::endl; -#ifdef DEBUG_NODE_MSGS #endif } diff --git a/libretroshare/src/pqi/pqiservice.cc b/libretroshare/src/pqi/pqiservice.cc index d473bf2ae..dbda2816a 100644 --- a/libretroshare/src/pqi/pqiservice.cc +++ b/libretroshare/src/pqi/pqiservice.cc @@ -105,7 +105,7 @@ bool p3ServiceServer::recvItem(RsRawItem *item) // This doesn't need to be in Mutex. if (!mServiceControl->checkFilter(item->PacketId() & 0xffffff00, item->PeerId())) { - std::cerr << "p3ServiceServer::recvItem() Fails Filtering"; + std::cerr << "p3ServiceServer::recvItem() Fails Filtering " << std::endl; delete item; return false; } diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc index b7eab2286..d90800ec9 100644 --- a/libretroshare/src/rsserver/p3peers.cc +++ b/libretroshare/src/rsserver/p3peers.cc @@ -919,7 +919,9 @@ bool p3Peers::setVisState(const RsPeerId &id, uint16_t vs_disc, uint16_t vs_dht) bool p3Peers::getProxyServer(std::string &addr, uint16_t &port, uint32_t &status) { + #ifdef P3PEERS_DEBUG std::cerr << "p3Peers::getProxyServer()" << std::endl; + #endif struct sockaddr_storage proxy_addr; mPeerMgr->getProxyServerAddress(proxy_addr); @@ -931,9 +933,9 @@ bool p3Peers::getProxyServer(std::string &addr, uint16_t &port, uint32_t &status bool p3Peers::setProxyServer(const std::string &addr_str, const uint16_t port) { -#ifdef P3PEERS_DEBUG -#endif + #ifdef P3PEERS_DEBUG std::cerr << "p3Peers::setProxyServer() " << std::endl; + #endif struct sockaddr_storage addr; struct sockaddr_in *addrv4p = (struct sockaddr_in *) &addr; diff --git a/retroshare-gui/src/util/HandleRichText.cpp b/retroshare-gui/src/util/HandleRichText.cpp index 6ef9ebc81..dd0abbecf 100644 --- a/retroshare-gui/src/util/HandleRichText.cpp +++ b/retroshare-gui/src/util/HandleRichText.cpp @@ -802,7 +802,7 @@ bool RsHtml::makeEmbeddedImage(const QString &fileName, QString &embeddedImage, QImage image; if (image.load (fileName) == false) { - fprintf (stderr, "RsHtml::makeEmbeddedImage() - image \"%s\" can't be load", fileName.toLatin1().constData()); + fprintf (stderr, "RsHtml::makeEmbeddedImage() - image \"%s\" can't be load\n", fileName.toLatin1().constData()); return false; } return RsHtml::makeEmbeddedImage(image, embeddedImage, maxPixels); @@ -845,11 +845,11 @@ bool RsHtml::makeEmbeddedImage(const QImage &originalImage, QString &embeddedIma embeddedImage.append(encodedByteArray); embeddedImage.append("\">"); } else { - fprintf (stderr, "RsHtml::makeEmbeddedImage() - image can't be saved to buffer"); + fprintf (stderr, "RsHtml::makeEmbeddedImage() - image can't be saved to buffer\n"); return false; } } else { - fprintf (stderr, "RsHtml::makeEmbeddedImage() - buffer can't be opened"); + fprintf (stderr, "RsHtml::makeEmbeddedImage() - buffer can't be opened\n"); return false; } return true;