diff --git a/libbitdht/src/bitdht/bdmanager.cc b/libbitdht/src/bitdht/bdmanager.cc index f23ce12eb..2ab1147ba 100644 --- a/libbitdht/src/bitdht/bdmanager.cc +++ b/libbitdht/src/bitdht/bdmanager.cc @@ -264,10 +264,10 @@ void bdNodeManager::iteration() uint32_t nodeSpaceSize = mNodeSpace.calcSpaceSize(); #ifdef DEBUG_MGR -#endif std::cerr << "bdNodeManager::iteration() Finding Oneself: "; std::cerr << "NodeSpace Size:" << nodeSpaceSize; std::cerr << std::endl; +#endif if (nodeSpaceSize > TRANSITION_OP_SPACE_SIZE) { @@ -423,7 +423,9 @@ void bdNodeManager::QueryRandomLocalNet() int bdNodeManager::status() { /* do status of bdNode */ +#ifdef DEBUG_MGR printState(); +#endif checkStatus(); @@ -1006,18 +1008,26 @@ bdDebugCallback::~bdDebugCallback() int bdDebugCallback::dhtPeerCallback(const bdNodeId *id, uint32_t status) { +#ifdef DEBUG_MGR std::cerr << "bdDebugCallback::dhtPeerCallback() Id: "; +#endif bdStdPrintNodeId(std::cerr, id); +#ifdef DEBUG_MGR std::cerr << " status: " << std::hex << status << std::dec << std::endl; +#endif return 1; } int bdDebugCallback::dhtValueCallback(const bdNodeId *id, std::string key, uint32_t status) { +#ifdef DEBUG_MGR std::cerr << "bdDebugCallback::dhtValueCallback() Id: "; +#endif bdStdPrintNodeId(std::cerr, id); +#ifdef DEBUG_MGR std::cerr << " key: " << key; std::cerr << " status: " << std::hex << status << std::dec << std::endl; +#endif return 1; } diff --git a/libbitdht/src/bitdht/bdpeer.cc b/libbitdht/src/bitdht/bdpeer.cc index 54c519120..e6b747cc1 100644 --- a/libbitdht/src/bitdht/bdpeer.cc +++ b/libbitdht/src/bitdht/bdpeer.cc @@ -596,12 +596,12 @@ int bdSpace::add_peer(const bdId *id, uint32_t peerflags) buck.entries.push_back(newPeer); #ifdef DEBUG_BD_SPACE -#endif /* useful debug */ std::cerr << "bdSpace::add_peer() Added Bucket["; std::cerr << bucket << "] Entry: "; mFns->bdPrintId(std::cerr, id); std::cerr << std::endl; +#endif } return add; }