*** empty log message ***
This commit is contained in:
parent
135d5a8cfd
commit
7ae866bf10
|
@ -152,7 +152,7 @@ int main(int argc, char* argv[])
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
|
|
||||||
// TEMPORARY
|
// TEMPORARY
|
||||||
// boost::filesystem::path::default_name_check(boost::filesystem::no_check);
|
boost::filesystem::path::default_name_check(boost::filesystem::no_check);
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -171,6 +171,8 @@ namespace libtorrent
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
void libtorrent::storage::invariant() const;
|
||||||
|
|
||||||
// total number of bytes left to be downloaded
|
// total number of bytes left to be downloaded
|
||||||
entry::integer_type m_bytes_left;
|
entry::integer_type m_bytes_left;
|
||||||
|
|
||||||
|
|
|
@ -1339,6 +1339,21 @@ void libtorrent::storage::initialize_pieces(torrent* t,
|
||||||
print_bitmask(m_have_piece);
|
print_bitmask(m_have_piece);
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
std::cout << std::count(m_have_piece.begin(), m_have_piece.end(), true) << "\n";
|
std::cout << std::count(m_have_piece.begin(), m_have_piece.end(), true) << "\n";
|
||||||
|
|
||||||
|
invariant();
|
||||||
|
}
|
||||||
|
|
||||||
|
void libtorrent::storage::invariant() const
|
||||||
|
{
|
||||||
|
// synchronization ------------------------------------------------------
|
||||||
|
boost::recursive_mutex::scoped_lock lock(m_mutex);
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
for (int i = 0; i < m_torrent_file->num_pieces(); ++i)
|
||||||
|
{
|
||||||
|
if (m_allocated_pieces[i] != m_torrent_file->piece_length() * i)
|
||||||
|
assert(m_slot_to_piece[i] < 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // OLD STORAGE
|
#if 0 // OLD STORAGE
|
||||||
|
|
Loading…
Reference in New Issue