*** empty log message ***

This commit is contained in:
Daniel Wallin 2003-12-05 10:10:06 +00:00
parent 135d5a8cfd
commit 7ae866bf10
3 changed files with 18 additions and 1 deletions

View File

@ -152,7 +152,7 @@ int main(int argc, char* argv[])
using namespace libtorrent;
// TEMPORARY
// boost::filesystem::path::default_name_check(boost::filesystem::no_check);
boost::filesystem::path::default_name_check(boost::filesystem::no_check);
if (argc < 2)
{

View File

@ -171,6 +171,8 @@ namespace libtorrent
private:
void libtorrent::storage::invariant() const;
// total number of bytes left to be downloaded
entry::integer_type m_bytes_left;

View File

@ -1339,6 +1339,21 @@ void libtorrent::storage::initialize_pieces(torrent* t,
print_bitmask(m_have_piece);
std::cout << "\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