fix lt assert
This commit is contained in:
parent
8821113742
commit
c8507b4c28
|
@ -780,6 +780,10 @@ namespace libtorrent
|
||||||
// the maximum number of connections for this torrent
|
// the maximum number of connections for this torrent
|
||||||
int m_max_connections;
|
int m_max_connections;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
bool m_files_checked;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||||
typedef std::list<boost::shared_ptr<torrent_plugin> > extension_list_t;
|
typedef std::list<boost::shared_ptr<torrent_plugin> > extension_list_t;
|
||||||
extension_list_t m_extensions;
|
extension_list_t m_extensions;
|
||||||
|
|
|
@ -204,6 +204,9 @@ namespace libtorrent
|
||||||
, m_max_connections((std::numeric_limits<int>::max)())
|
, m_max_connections((std::numeric_limits<int>::max)())
|
||||||
, m_policy(this)
|
, m_policy(this)
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
|
m_files_checked = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
torrent::torrent(
|
torrent::torrent(
|
||||||
|
@ -263,6 +266,9 @@ namespace libtorrent
|
||||||
, m_max_connections((std::numeric_limits<int>::max)())
|
, m_max_connections((std::numeric_limits<int>::max)())
|
||||||
, m_policy(this)
|
, m_policy(this)
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
|
m_files_checked = false;
|
||||||
|
#endif
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
||||||
if (name) m_name.reset(new std::string(name));
|
if (name) m_name.reset(new std::string(name));
|
||||||
|
@ -2521,6 +2527,9 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifndef NDEBUG
|
||||||
|
m_files_checked = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
alert_manager& torrent::alerts() const
|
alert_manager& torrent::alerts() const
|
||||||
|
@ -2658,7 +2667,7 @@ namespace libtorrent
|
||||||
complete = false;
|
complete = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (complete)
|
if (complete && m_files_checked)
|
||||||
{
|
{
|
||||||
disk_io_job ret = m_ses.m_disk_thread.find_job(
|
disk_io_job ret = m_ses.m_disk_thread.find_job(
|
||||||
m_owning_storage, -1, i->index);
|
m_owning_storage, -1, i->index);
|
||||||
|
|
Loading…
Reference in New Issue