From 649d7646fb9271ffc3782295d2068b86064251f5 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 2 Sep 2014 08:01:09 +0000 Subject: [PATCH] test build fix. another boost.chrono overflow issue fixed --- src/storage.cpp | 2 +- test/test_ssl.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/storage.cpp b/src/storage.cpp index 8b0537142..7ea8d733e 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -126,7 +126,7 @@ namespace libtorrent // uint8_t event (0: start read, 1: start write, 2: complete read, 4: complete write) char event[29]; char* ptr = event; - detail::write_uint64(total_microseconds((timestamp - min_time())), ptr); + detail::write_uint64(timestamp.time_since_epoch().count(), ptr); detail::write_uint64(offset, ptr); detail::write_uint64((boost::uint64_t)event_id++, ptr); detail::write_uint32(fileid, ptr); diff --git a/test/test_ssl.cpp b/test/test_ssl.cpp index fe9b50c7d..e3d8a0114 100644 --- a/test/test_ssl.cpp +++ b/test/test_ssl.cpp @@ -128,7 +128,7 @@ void test_ssl(int test_idx, bool use_utp) sett.set_bool(settings_pack::enable_natpmp, false); sett.set_int(settings_pack::ssl_listen, ssl_port); - session ses1(sett, fingerprint("LT", 0, 1, 0, 0), 0); + libtorrent::session ses1(sett, fingerprint("LT", 0, 1, 0, 0), 0); if (!test.downloader_has_cert) // this disables outgoing SSL connections @@ -136,7 +136,7 @@ void test_ssl(int test_idx, bool use_utp) else sett.set_int(settings_pack::ssl_listen, ssl_port + 20); - session ses2(sett, fingerprint("LT", 0, 1, 0, 0), 0); + libtorrent::session ses2(sett, fingerprint("LT", 0, 1, 0, 0), 0); wait_for_listen(ses1, "ses1"); wait_for_listen(ses2, "ses2"); @@ -289,7 +289,7 @@ attack_t attacks[] = const int num_attacks = sizeof(attacks)/sizeof(attacks[0]); -bool try_connect(session& ses1, int port +bool try_connect(libtorrent::session& ses1, int port , boost::shared_ptr const& t, boost::uint32_t flags) { using boost::asio::ssl::context; @@ -501,7 +501,7 @@ void test_malicious_peer() sett.set_bool(settings_pack::enable_upnp, false); sett.set_bool(settings_pack::enable_natpmp, false); - session ses1(sett, fingerprint("LT", 0, 1, 0, 0), 0); + libtorrent::session ses1(sett, fingerprint("LT", 0, 1, 0, 0), 0); wait_for_listen(ses1, "ses1"); // create torrent