removed 'adler32' key from fastresume, since it was implemented with blocking I/O
This commit is contained in:
parent
601b7571f5
commit
c5fd5ecfb4
|
@ -2683,22 +2683,24 @@ namespace detail
|
||||||
|
|
||||||
TORRENT_ASSERT(*slot_iter == p.index);
|
TORRENT_ASSERT(*slot_iter == p.index);
|
||||||
int slot_index = static_cast<int>(slot_iter - tmp_pieces.begin());
|
int slot_index = static_cast<int>(slot_iter - tmp_pieces.begin());
|
||||||
|
const entry* ad = i->find_key("adler32");
|
||||||
|
|
||||||
|
if (ad && ad->type() == entry::int_t)
|
||||||
|
{
|
||||||
unsigned long adler
|
unsigned long adler
|
||||||
= torrent_ptr->filesystem().piece_crc(
|
= torrent_ptr->filesystem().piece_crc(
|
||||||
slot_index
|
slot_index
|
||||||
, torrent_ptr->block_size()
|
, torrent_ptr->block_size()
|
||||||
, p.info);
|
, p.info);
|
||||||
|
|
||||||
const entry* ad = i->find_key("adler32");
|
|
||||||
|
|
||||||
// crc's didn't match, don't use the resume data
|
// crc's didn't match, don't use the resume data
|
||||||
if (ad && ad->type() == entry::int_t
|
if (ad->integer() != entry::integer_type(adler))
|
||||||
&& ad->integer() != entry::integer_type(adler))
|
|
||||||
{
|
{
|
||||||
error = "checksum mismatch on piece "
|
error = "checksum mismatch on piece "
|
||||||
+ boost::lexical_cast<std::string>(p.index);
|
+ boost::lexical_cast<std::string>(p.index);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tmp_unfinished.push_back(p);
|
tmp_unfinished.push_back(p);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue