fix some release asserts

This commit is contained in:
Arvid Norberg 2011-08-27 09:47:36 +00:00
parent 7a48e90246
commit e7185b519b
1 changed files with 8 additions and 3 deletions

View File

@ -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
}