diff --git a/ChangeLog b/ChangeLog index a1ae48654..4f524c201 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 1.1.1 release + * deprecate lt_trackers extension * remove load_asnum_db and load_country_db from python bindings * fix crash in session::get_ip_filter when not having set one * fix filename escaping when repairing torrents with broken web seeds diff --git a/bindings/python/src/session.cpp b/bindings/python/src/session.cpp index 42626f6b7..1363f02b6 100644 --- a/bindings/python/src/session.cpp +++ b/bindings/python/src/session.cpp @@ -17,8 +17,10 @@ #include #include // for sign_mutable_item +#ifndef TORRENT_NO_DEPRECATE #include #include +#endif #include #include #include @@ -88,9 +90,9 @@ namespace s.add_extension(create_ut_pex_plugin); else if (name == "smart_ban") s.add_extension(create_smart_ban_plugin); +#ifndef TORRENT_NO_DEPRECATE else if (name == "lt_trackers") s.add_extension(create_lt_trackers_plugin); -#ifndef TORRENT_NO_DEPRECATE else if (name == "metadata_transfer") s.add_extension(create_metadata_plugin); #endif // TORRENT_NO_DEPRECATE diff --git a/include/libtorrent/extensions/lt_trackers.hpp b/include/libtorrent/extensions/lt_trackers.hpp index 3e3e21be8..b97973e27 100644 --- a/include/libtorrent/extensions/lt_trackers.hpp +++ b/include/libtorrent/extensions/lt_trackers.hpp @@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef TORRENT_LT_TRACKERS_HPP_INCLUDED #define TORRENT_LT_TRACKERS_HPP_INCLUDED +#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_DISABLE_EXTENSIONS #include "libtorrent/config.hpp" @@ -51,10 +52,12 @@ namespace libtorrent // constructor function for the trackers exchange extension. This can // either be passed in the add_torrent_params::extensions field, or // via torrent_handle::add_extension(). + TORRENT_DEPRECATED boost::shared_ptr TORRENT_EXPORT create_lt_trackers_plugin(torrent_handle const&, void*); } #endif // TORRENT_DISABLE_EXTENSIONS +#endif // TORRENT_NO_DEPRECATE #endif // TORRENT_LT_TRACKERS_HPP_INCLUDED diff --git a/simulation/test_swarm.cpp b/simulation/test_swarm.cpp index a7ca939aa..fc40f8021 100644 --- a/simulation/test_swarm.cpp +++ b/simulation/test_swarm.cpp @@ -308,6 +308,7 @@ TORRENT_TEST(stop_start_seed_graceful) test_stop_start_download(swarm_test::upload, true); } +#ifndef TORRENT_NO_DEPRECATE TORRENT_TEST(explicit_cache) { setup_swarm(2, swarm_test::download @@ -333,6 +334,7 @@ TORRENT_TEST(explicit_cache) return true; }); } +#endif TORRENT_TEST(shutdown) { diff --git a/simulation/test_trackers_extension.cpp b/simulation/test_trackers_extension.cpp index 10cf1eac1..0e639d989 100644 --- a/simulation/test_trackers_extension.cpp +++ b/simulation/test_trackers_extension.cpp @@ -30,6 +30,10 @@ POSSIBILITY OF SUCH DAMAGE. */ +#include "test.hpp" + +#ifndef TORRENT_NO_DEPRECATE + #include "setup_swarm.hpp" #include "libtorrent/alert.hpp" #include "libtorrent/announce_entry.hpp" @@ -38,7 +42,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/alert_types.hpp" #include "libtorrent/extensions/lt_trackers.hpp" #include "libtorrent/session.hpp" -#include "test.hpp" #include "settings.hpp" using namespace libtorrent; @@ -153,4 +156,7 @@ TORRENT_TEST(no_metadata) TEST_EQUAL(connected, true); } +#else +TORRENT_TEST(dummy) {} +#endif diff --git a/src/lt_trackers.cpp b/src/lt_trackers.cpp index e6f78781e..e019435c3 100644 --- a/src/lt_trackers.cpp +++ b/src/lt_trackers.cpp @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. */ +#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_DISABLE_EXTENSIONS #include "libtorrent/aux_/disable_warnings_push.hpp" @@ -390,4 +391,5 @@ namespace libtorrent } #endif +#endif