*** empty log message ***
This commit is contained in:
parent
e257516670
commit
f729893016
|
@ -679,6 +679,8 @@ namespace libtorrent
|
|||
|
||||
m_torrent->filesystem().write(&m_recv_buffer[9], p.piece, p.start, p.length);
|
||||
|
||||
bool was_seed = is_seed();
|
||||
|
||||
picker.mark_as_finished(block_finished, m_socket->sender());
|
||||
|
||||
m_torrent->get_policy().block_finished(*this, block_finished);
|
||||
|
@ -698,6 +700,13 @@ namespace libtorrent
|
|||
m_torrent->piece_failed(p.piece);
|
||||
}
|
||||
m_torrent->get_policy().piece_finished(p.piece, verified);
|
||||
|
||||
if (!was_seed && is_seed())
|
||||
{
|
||||
assert(verified);
|
||||
// TODO: post torrent_finished_alert
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,10 +107,19 @@ namespace libtorrent
|
|||
for (torrent_info::file_iterator i = t.begin_files();
|
||||
i != t.end_files();
|
||||
++i)
|
||||
{
|
||||
size_type file_size;
|
||||
try
|
||||
{
|
||||
file f(p / i->path / i->filename, file::in);
|
||||
f.seek(0, file::end);
|
||||
sizes.push_back(f.tell());
|
||||
file_size = f.tell();
|
||||
}
|
||||
catch (file_error&)
|
||||
{
|
||||
file_size = 0;
|
||||
}
|
||||
sizes.push_back(file_size);
|
||||
}
|
||||
return sizes;
|
||||
}
|
||||
|
@ -126,10 +135,19 @@ namespace libtorrent
|
|||
for (torrent_info::file_iterator i = t.begin_files();
|
||||
i != t.end_files();
|
||||
++i, ++s)
|
||||
{
|
||||
size_type file_size;
|
||||
try
|
||||
{
|
||||
file f(p / i->path / i->filename, file::in);
|
||||
f.seek(0, file::end);
|
||||
if (f.tell() != *s) return false;
|
||||
file_size = f.tell();
|
||||
}
|
||||
catch (file_error&)
|
||||
{
|
||||
file_size = 0;
|
||||
}
|
||||
if (file_size != *s) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue