From 3d2726c52389dc1e045fe67a7c17b9cd7fb8db11 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 27 Dec 2008 03:34:05 +0000 Subject: [PATCH] dht stats now truncates the log from previous run --- src/kademlia/dht_tracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kademlia/dht_tracker.cpp b/src/kademlia/dht_tracker.cpp index 6b559f9c5..cd78209f6 100644 --- a/src/kademlia/dht_tracker.cpp +++ b/src/kademlia/dht_tracker.cpp @@ -342,7 +342,7 @@ namespace libtorrent { namespace dht int peers = 0; std::for_each(m_dht.begin_data(), m_dht.end_data(), count_peers(peers)); - std::ofstream pc("dht_stats.log", std::ios_base::app); + std::ofstream pc("dht_stats.log", std::ios_base::app | std::ios_base::trunc); if (first) { first = false;