From e7185b519b713c4c2fe2a6772ae304ce0fb1300a Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 27 Aug 2011 09:47:36 +0000 Subject: [PATCH] fix some release asserts --- src/session_impl.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 409cb488e..635e867e5 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -544,7 +544,7 @@ namespace aux { #endif , m_total_failed_bytes(0) , m_total_redundant_bytes(0) -#if defined TORRENT_DEBUG && defined BOOST_HAS_PTHREADS +#if (defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS) && defined BOOST_HAS_PTHREADS , m_network_thread(0) #endif { @@ -815,6 +815,11 @@ namespace aux { extern void get_vm_stats(vm_statistics_data_t* vm_stat); get_vm_stats(&m_last_vm_stat); + m_last_failed = 0; + m_last_redundant = 0; + m_last_uploaded = 0; + m_last_downloaded = 0; + reset_stat_counters(); rotate_stats_log(); #endif @@ -4016,7 +4021,7 @@ namespace aux { void session_impl::main_thread() { -#if defined TORRENT_DEBUG && defined BOOST_HAS_PTHREADS +#if (defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS) && defined BOOST_HAS_PTHREADS m_network_thread = pthread_self(); #endif TORRENT_ASSERT(is_network_thread()); @@ -4064,7 +4069,7 @@ namespace aux { TORRENT_ASSERT(m_torrents.empty()); TORRENT_ASSERT(m_connections.empty()); -#if defined TORRENT_DEBUG && defined BOOST_HAS_PTHREADS +#if (defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS) && defined BOOST_HAS_PTHREADS m_network_thread = 0; #endif }