Load torrents that have big metadata file. Closes #1889.

This commit is contained in:
sledgehammer999
2014-11-16 21:25:42 +02:00
parent 0adb9fcbce
commit f35e06540e
5 changed files with 115 additions and 76 deletions

View File

@@ -44,6 +44,7 @@
#endif
#include <libtorrent/version.hpp>
#include <libtorrent/error_code.hpp>
namespace libtorrent {
#if LIBTORRENT_VERSION_NUM < 10000
@@ -52,6 +53,7 @@ namespace libtorrent {
#else
class sha1_hash;
#endif
struct lazy_entry;
}
const qlonglong MAX_ETA = 8640000;
@@ -109,6 +111,7 @@ namespace misc
// Implements constant-time comparison to protect against timing attacks
// Taken from https://crackstation.net/hashing-security.htm
bool slowEquals(const QByteArray &a, const QByteArray &b);
void loadBencodedFile(const QString &filename, std::vector<char> &buffer, libtorrent::lazy_entry &entry, libtorrent::error_code &ec);
void msleep(unsigned long msecs);
}