fixed assert when built with disk stats
This commit is contained in:
parent
5e2254df97
commit
7933132cd9
|
@ -172,7 +172,7 @@ namespace libtorrent
|
||||||
~disk_buffer_pool();
|
~disk_buffer_pool();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TORRENT_DEBUG
|
#if defined TORRENT_DEBUG || defined TORRENT_DISK_STATS
|
||||||
bool is_disk_buffer(char* buffer
|
bool is_disk_buffer(char* buffer
|
||||||
, boost::mutex::scoped_lock& l) const;
|
, boost::mutex::scoped_lock& l) const;
|
||||||
bool is_disk_buffer(char* buffer) const;
|
bool is_disk_buffer(char* buffer) const;
|
||||||
|
|
|
@ -481,7 +481,8 @@ namespace libtorrent
|
||||||
void append_send_buffer(char* buffer, int size, Destructor const& destructor)
|
void append_send_buffer(char* buffer, int size, Destructor const& destructor)
|
||||||
{
|
{
|
||||||
#if TORRENT_DISK_STATS
|
#if TORRENT_DISK_STATS
|
||||||
m_ses.m_disk_thread.rename_buffer(buffer, "queued send buffer");
|
if (m_ses.m_disk_thread.is_disk_buffer(buffer))
|
||||||
|
m_ses.m_disk_thread.rename_buffer(buffer, "queued send buffer");
|
||||||
#endif
|
#endif
|
||||||
m_send_buffer.append_buffer(buffer, size, size, destructor);
|
m_send_buffer.append_buffer(buffer, size, size, destructor);
|
||||||
#ifdef TORRENT_STATS
|
#ifdef TORRENT_STATS
|
||||||
|
|
|
@ -78,7 +78,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TORRENT_DEBUG
|
#if defined TORRENT_DEBUG || defined TORRENT_DISK_STATS
|
||||||
bool disk_buffer_pool::is_disk_buffer(char* buffer
|
bool disk_buffer_pool::is_disk_buffer(char* buffer
|
||||||
,boost::mutex::scoped_lock& l) const
|
,boost::mutex::scoped_lock& l) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue