missing inc dht counter and minor cleanup (#1164)
This commit is contained in:
parent
84e735c0ea
commit
af92e91a90
|
@ -123,7 +123,7 @@ namespace libtorrent { namespace dht
|
|||
, std::vector<dht_lookup>& requests);
|
||||
void update_stats_counters(counters& c) const;
|
||||
|
||||
void incoming_error(error_code const& ec, udp::endpoint const&);
|
||||
void incoming_error(error_code const& ec, udp::endpoint const& ep);
|
||||
bool incoming_packet(udp::endpoint const& ep, span<char const> buf);
|
||||
|
||||
private:
|
||||
|
|
|
@ -556,7 +556,7 @@ void block_cache::try_evict_one_volatile()
|
|||
|
||||
for (list_iterator<cached_piece_entry> i = piece_list->iterate(); i.get();)
|
||||
{
|
||||
cached_piece_entry* pe = reinterpret_cast<cached_piece_entry*>(i.get());
|
||||
cached_piece_entry* pe = i.get();
|
||||
TORRENT_PIECE_ASSERT(pe->in_use, pe);
|
||||
i.next();
|
||||
|
||||
|
@ -1070,7 +1070,7 @@ int block_cache::try_evict_blocks(int num, cached_piece_entry* ignore)
|
|||
// weren't in this list
|
||||
for (list_iterator<cached_piece_entry> i = lru_list[end]->iterate(); i.get() && num > 0;)
|
||||
{
|
||||
cached_piece_entry* pe = reinterpret_cast<cached_piece_entry*>(i.get());
|
||||
cached_piece_entry* pe = i.get();
|
||||
TORRENT_PIECE_ASSERT(pe->in_use, pe);
|
||||
i.next();
|
||||
|
||||
|
@ -1142,7 +1142,7 @@ int block_cache::try_evict_blocks(int num, cached_piece_entry* ignore)
|
|||
{
|
||||
for (list_iterator<cached_piece_entry> i = m_lru[cached_piece_entry::write_lru].iterate(); i.get() && num > 0;)
|
||||
{
|
||||
cached_piece_entry* pe = reinterpret_cast<cached_piece_entry*>(i.get());
|
||||
cached_piece_entry* pe = i.get();
|
||||
TORRENT_PIECE_ASSERT(pe->in_use, pe);
|
||||
|
||||
i.next();
|
||||
|
|
|
@ -515,6 +515,7 @@ namespace libtorrent { namespace dht
|
|||
|
||||
if (m_msg.type() != bdecode_node::dict_t)
|
||||
{
|
||||
m_counters.inc_stats_counter(counters::dht_messages_in_dropped);
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
m_log->log_packet(dht_logger::incoming_message, buf, ep);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue