From b97ac65c01a5354bb41f5b018ad8eef8c3ba0a68 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sun, 26 Jun 2016 13:11:52 -0400 Subject: [PATCH] don't perform expensive hash of piece data for logging --- src/peer_connection.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index e77bd43d1..229505f05 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -2699,12 +2699,9 @@ namespace libtorrent #endif #ifndef TORRENT_DISABLE_LOGGING - hasher h; - h.update(data.get(), p.length); - peer_log(peer_log_alert::incoming_message, "PIECE", "piece: %d s: %x l: %x ds: %d qs: %d q: %d hash: %s" + peer_log(peer_log_alert::incoming_message, "PIECE", "piece: %d s: %x l: %x ds: %d qs: %d q: %d" , p.piece, p.start, p.length, statistics().download_rate() - , int(m_desired_queue_size), int(m_download_queue.size()) - , to_hex(h.final().to_string()).c_str()); + , int(m_desired_queue_size), int(m_download_queue.size())); #endif if (p.length == 0)