fix bug in dht logging build

This commit is contained in:
Arvid Norberg 2013-12-21 09:22:10 +00:00
parent 70735a0a67
commit 11a584991b
2 changed files with 6 additions and 1 deletions

View File

@ -114,7 +114,8 @@ namespace libtorrent { namespace dht
void tick(error_code const& e);
// implements udp_socket_interface
virtual bool send_packet(libtorrent::entry& e, udp::endpoint const& addr, int send_flags);
virtual bool send_packet(libtorrent::entry& e, udp::endpoint const& addr
, int send_flags);
node_impl m_dht;
rate_limited_udp_socket& m_sock;

View File

@ -659,6 +659,9 @@ namespace libtorrent { namespace dht
if (e["y"].string() == "r")
{
/*
// This doesn't work. r is a dictionary with return
// values. The query type isn't part of the response
std::string cmd = e["r"].string();
int cmd_idx = -1;
if (cmd == "ping") cmd_idx = 0;
@ -670,6 +673,7 @@ namespace libtorrent { namespace dht
++m_replies_sent[cmd_idx];
m_replies_bytes_sent[cmd_idx] += int(m_send_buf.size());
}
*/
}
else if (e["y"].string() == "q")
{