merged dht fix from libtorrent_aio

This commit is contained in:
Arvid Norberg 2013-10-06 01:48:57 +00:00
parent a5494f2984
commit f2e3e613b2
1 changed files with 2 additions and 0 deletions

View File

@ -323,6 +323,7 @@ bool rpc_manager::incoming(msg const& m, node_id* id)
lazy_entry const* ret_ent = m.message.dict_find_dict("r");
if (ret_ent == 0)
{
o->timeout();
entry e;
incoming_error(e, "missing 'r' key");
m_sock->send_packet(e, m.addr, 0);
@ -332,6 +333,7 @@ bool rpc_manager::incoming(msg const& m, node_id* id)
lazy_entry const* node_id_ent = ret_ent->dict_find_string("id");
if (node_id_ent == 0 || node_id_ent->string_length() != 20)
{
o->timeout();
entry e;
incoming_error(e, "missing 'id' key");
m_sock->send_packet(e, m.addr, 0);