forked from premiere/premiere-libtorrent
DHT is more forgiving when parsing responses and logs messages that fails to decode
This commit is contained in:
parent
a2b359b64e
commit
ceb442bea0
|
@ -641,8 +641,11 @@ namespace libtorrent { namespace dht
|
|||
catch (std::exception& e)
|
||||
{
|
||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||
int current_buffer = (m_buffer + 1) & 1;
|
||||
std::string msg(m_in_buf[current_buffer].begin()
|
||||
, m_in_buf[current_buffer].end());
|
||||
TORRENT_LOG(dht_tracker) << "invalid incoming packet: "
|
||||
<< e.what();
|
||||
<< e.what() << "\n" << msg.c_str() << "\n";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ bool rpc_manager::incoming(msg const& m)
|
|||
// if we don't have the transaction id in our
|
||||
// request list, ignore the packet
|
||||
|
||||
if (m.transaction_id.size() != 2)
|
||||
if (m.transaction_id.size() < 2)
|
||||
{
|
||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||
TORRENT_LOG(rpc) << "Reply with invalid transaction id size: "
|
||||
|
|
Loading…
Reference in New Issue