mirror of https://github.com/aria2/aria2
2010-03-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Enclosed log of DHTMessage::toString() with Logger::info(). * src/DHTMessageDispatcherImpl.cc * src/DHTMessageReceiver.ccpull/1/head
parent
ca54ff894e
commit
b55f2de8e6
|
@ -1,3 +1,9 @@
|
|||
2010-03-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Enclosed log of DHTMessage::toString() with Logger::info().
|
||||
* src/DHTMessageDispatcherImpl.cc
|
||||
* src/DHTMessageReceiver.cc
|
||||
|
||||
2010-03-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Rewritten util::toHex().
|
||||
|
|
|
@ -76,7 +76,9 @@ DHTMessageDispatcherImpl::sendMessage(const SharedHandle<DHTMessageEntry>& entry
|
|||
if(!entry->_message->isReply()) {
|
||||
_tracker->addMessage(entry->_message, entry->_timeout, entry->_callback);
|
||||
}
|
||||
_logger->info("Message sent: %s", entry->_message->toString().c_str());
|
||||
if(_logger->info()) {
|
||||
_logger->info("Message sent: %s", entry->_message->toString().c_str());
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -110,7 +110,9 @@ SharedHandle<DHTMessage> DHTMessageReceiver::receiveMessage()
|
|||
return handleUnknownMessage(data, sizeof(data), remoteAddr, remotePort);
|
||||
}
|
||||
}
|
||||
_logger->info("Message received: %s", message->toString().c_str());
|
||||
if(_logger->info()) {
|
||||
_logger->info("Message received: %s", message->toString().c_str());
|
||||
}
|
||||
message->validate();
|
||||
message->doReceivedAction();
|
||||
message->getRemoteNode()->markGood();
|
||||
|
@ -139,7 +141,9 @@ DHTMessageReceiver::handleUnknownMessage(const unsigned char* data,
|
|||
{
|
||||
SharedHandle<DHTMessage> m =
|
||||
_factory->createUnknownMessage(data, length, remoteAddr, remotePort);
|
||||
_logger->info("Message received: %s", m->toString().c_str());
|
||||
if(_logger->info()) {
|
||||
_logger->info("Message received: %s", m->toString().c_str());
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue