fixed bugs reported by Massaroddel. Tracker request peer-count could be incorrect. Empty files were not created in full allocation mode.

This commit is contained in:
Arvid Norberg
2006-07-08 19:41:39 +00:00
parent 175fb8770b
commit 4403eac97b
6 changed files with 40 additions and 4 deletions

View File

@@ -212,6 +212,11 @@ namespace libtorrent
assert(m_open_mode & mode_out);
assert(m_fd != -1);
// Test this a bit more, what happens with random failures in
// the files?
// if ((rand() % 100) > 80)
// throw file_error("debug");
size_type ret = ::write(m_fd, buf, num_bytes);
if (ret == -1)
{