2010-01-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Ignore port message with port=0.
	* src/BtPortMessage.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-01-07 12:49:51 +00:00
parent 011871cec8
commit e56f2afbbf
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-01-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Ignore port message with port=0.
* src/BtPortMessage.cc
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Run autoupdate

View File

@ -71,6 +71,10 @@ SharedHandle<BtPortMessage> BtPortMessage::create(const unsigned char* data, siz
void BtPortMessage::doReceivedAction()
{
if(!_taskFactory.isNull() && !_taskQueue.isNull()) {
if(_port == 0) {
logger->debug("Ignored port 0.");
return;
}
// node id is random at this point. When ping reply received, new DHTNode
// instance created with proper node ID and is added to a routing table.
SharedHandle<DHTNode> node(new DHTNode());