forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
a8e8c715e8
commit
c48f64c2ec
|
@ -90,8 +90,8 @@ namespace libtorrent
|
|||
#ifndef NDEBUG
|
||||
_clearfp();
|
||||
_controlfp(_EM_INEXACT | _EM_UNDERFLOW, _MCW_EM );
|
||||
#endif
|
||||
::_set_se_translator(straight_to_debugger);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void straight_to_debugger(unsigned int, _EXCEPTION_POINTERS*)
|
||||
|
|
|
@ -110,6 +110,7 @@ namespace libtorrent
|
|||
|
||||
void open(fs::path const& path, int mode)
|
||||
{
|
||||
assert(path.is_complete());
|
||||
close();
|
||||
m_fd = ::open(
|
||||
path.native_file_string().c_str()
|
||||
|
@ -129,9 +130,6 @@ namespace libtorrent
|
|||
{
|
||||
if (m_fd == -1) return;
|
||||
|
||||
std::stringstream str;
|
||||
str << "fd: " << m_fd << "\n";
|
||||
|
||||
::close(m_fd);
|
||||
m_fd = -1;
|
||||
m_open_mode = 0;
|
||||
|
|
|
@ -280,6 +280,7 @@ namespace libtorrent
|
|||
|
||||
void file::open(boost::filesystem::path const& p, open_mode m)
|
||||
{
|
||||
assert(p.is_complete());
|
||||
m_impl->open(p.native_file_string().c_str(), impl::open_flags(m.m_mask));
|
||||
}
|
||||
|
||||
|
|
|
@ -155,6 +155,19 @@ namespace libtorrent
|
|||
}
|
||||
#endif
|
||||
m_piece_length = size;
|
||||
|
||||
|
||||
int num_pieces = static_cast<int>(
|
||||
(m_total_size + m_piece_length - 1) / m_piece_length);
|
||||
int old_num_pieces = static_cast<int>(m_piece_hash.size());
|
||||
|
||||
m_piece_hash.resize(num_pieces);
|
||||
for (std::vector<sha1_hash>::iterator i = m_piece_hash.begin() + old_num_pieces;
|
||||
i != m_piece_hash.end();
|
||||
++i)
|
||||
{
|
||||
i->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void torrent_info::parse_info_section(entry const& info)
|
||||
|
|
Loading…
Reference in New Issue