forked from premiere/premiere-libtorrent
fix build i2p=on,off configurations
This commit is contained in:
parent
c76e9cc5e1
commit
7e13b34158
|
@ -1070,8 +1070,6 @@ example alert_masks:
|
|||
|
||||
lt::session_params params;
|
||||
|
||||
lt::error_code ec;
|
||||
|
||||
#ifndef TORRENT_DISABLE_DHT
|
||||
params.dht_settings.privacy_lookups = true;
|
||||
|
||||
|
@ -1079,6 +1077,7 @@ example alert_masks:
|
|||
if (load_file(".ses_state", in))
|
||||
{
|
||||
lt::bdecode_node e;
|
||||
lt::error_code ec;
|
||||
if (bdecode(&in[0], &in[0] + in.size(), e, ec) == 0)
|
||||
params = read_session_params(e, session_handle::save_dht_state);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTORRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY)
|
||||
|
||||
#define LIBTORRENT_VERSION "1.2.0.0"
|
||||
#define LIBTORRENT_REVISION "62cdec8"
|
||||
#define LIBTORRENT_REVISION "c76e9cc5e"
|
||||
|
||||
namespace libtorrent {
|
||||
|
||||
|
|
|
@ -218,11 +218,11 @@ TORRENT_TEST(base64)
|
|||
TEST_CHECK(base64encode("foobar") == "Zm9vYmFy");
|
||||
}
|
||||
|
||||
#if TORRENT_USE_I2P
|
||||
TORRENT_TEST(base32)
|
||||
{
|
||||
// base32 test vectors from http://www.faqs.org/rfcs/rfc4648.html
|
||||
|
||||
#if TORRENT_USE_I2P
|
||||
TEST_CHECK(base32encode("") == "");
|
||||
TEST_CHECK(base32encode("f") == "MY======");
|
||||
TEST_CHECK(base32encode("fo") == "MZXQ====");
|
||||
|
@ -235,6 +235,12 @@ TORRENT_TEST(base32)
|
|||
TEST_CHECK(base32encode("fo", string::no_padding) == "MZXQ");
|
||||
TEST_CHECK(base32encode("foob", string::i2p) == "mzxw6yq");
|
||||
TEST_CHECK(base32encode("foobar", string::lowercase) == "mzxw6ytboi======");
|
||||
|
||||
std::string test;
|
||||
for (int i = 0; i < 255; ++i)
|
||||
test += char(i);
|
||||
|
||||
TEST_CHECK(base32decode(base32encode(test)) == test);
|
||||
#endif // TORRENT_USE_I2P
|
||||
|
||||
TEST_CHECK(base32decode("") == "");
|
||||
|
@ -252,12 +258,6 @@ TORRENT_TEST(base32)
|
|||
|
||||
// make sure invalid encoding returns the empty string
|
||||
TEST_CHECK(base32decode("mZXw6yTBO1{#&*()=") == "");
|
||||
|
||||
std::string test;
|
||||
for (int i = 0; i < 255; ++i)
|
||||
test += char(i);
|
||||
|
||||
TEST_CHECK(base32decode(base32encode(test)) == test);
|
||||
}
|
||||
|
||||
TORRENT_TEST(escape_string)
|
||||
|
|
|
@ -110,6 +110,7 @@ TORRENT_TEST(parse_peers4)
|
|||
}
|
||||
}
|
||||
|
||||
#if TORRENT_USE_I2P
|
||||
TORRENT_TEST(parse_i2p_peers)
|
||||
{
|
||||
// d8:completei8e10:incompletei4e8:intervali3600e5:peers352: ...
|
||||
|
@ -171,6 +172,7 @@ TORRENT_TEST(parse_i2p_peers)
|
|||
, "ufunemgwuun5t2sn3oay4zv7jvwdezwcrirgwr6b2fjgczvaowvq.b32.i2p");
|
||||
}
|
||||
}
|
||||
#endif // TORRENT_USE_I2P
|
||||
|
||||
TORRENT_TEST(parse_interval)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue