deprecate lt_trackers extension (#940)

deprecate lt_trackers extension
This commit is contained in:
Arvid Norberg 2016-07-24 23:37:03 -04:00 committed by GitHub
parent 3321ca10f1
commit 6370d5bc81
6 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,6 @@
1.1.1 release 1.1.1 release
* deprecate lt_trackers extension
* remove load_asnum_db and load_country_db from python bindings * remove load_asnum_db and load_country_db from python bindings
* fix crash in session::get_ip_filter when not having set one * fix crash in session::get_ip_filter when not having set one
* fix filename escaping when repairing torrents with broken web seeds * fix filename escaping when repairing torrents with broken web seeds

View File

@ -17,8 +17,10 @@
#include <libtorrent/torrent_info.hpp> #include <libtorrent/torrent_info.hpp>
#include <libtorrent/kademlia/item.hpp> // for sign_mutable_item #include <libtorrent/kademlia/item.hpp> // for sign_mutable_item
#ifndef TORRENT_NO_DEPRECATE
#include <libtorrent/extensions/lt_trackers.hpp> #include <libtorrent/extensions/lt_trackers.hpp>
#include <libtorrent/extensions/metadata_transfer.hpp> #include <libtorrent/extensions/metadata_transfer.hpp>
#endif
#include <libtorrent/extensions/smart_ban.hpp> #include <libtorrent/extensions/smart_ban.hpp>
#include <libtorrent/extensions/ut_metadata.hpp> #include <libtorrent/extensions/ut_metadata.hpp>
#include <libtorrent/extensions/ut_pex.hpp> #include <libtorrent/extensions/ut_pex.hpp>
@ -88,9 +90,9 @@ namespace
s.add_extension(create_ut_pex_plugin); s.add_extension(create_ut_pex_plugin);
else if (name == "smart_ban") else if (name == "smart_ban")
s.add_extension(create_smart_ban_plugin); s.add_extension(create_smart_ban_plugin);
#ifndef TORRENT_NO_DEPRECATE
else if (name == "lt_trackers") else if (name == "lt_trackers")
s.add_extension(create_lt_trackers_plugin); s.add_extension(create_lt_trackers_plugin);
#ifndef TORRENT_NO_DEPRECATE
else if (name == "metadata_transfer") else if (name == "metadata_transfer")
s.add_extension(create_metadata_plugin); s.add_extension(create_metadata_plugin);
#endif // TORRENT_NO_DEPRECATE #endif // TORRENT_NO_DEPRECATE

View File

@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef TORRENT_LT_TRACKERS_HPP_INCLUDED #ifndef TORRENT_LT_TRACKERS_HPP_INCLUDED
#define TORRENT_LT_TRACKERS_HPP_INCLUDED #define TORRENT_LT_TRACKERS_HPP_INCLUDED
#ifndef TORRENT_NO_DEPRECATE
#ifndef TORRENT_DISABLE_EXTENSIONS #ifndef TORRENT_DISABLE_EXTENSIONS
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
@ -51,10 +52,12 @@ namespace libtorrent
// constructor function for the trackers exchange extension. This can // constructor function for the trackers exchange extension. This can
// either be passed in the add_torrent_params::extensions field, or // either be passed in the add_torrent_params::extensions field, or
// via torrent_handle::add_extension(). // via torrent_handle::add_extension().
TORRENT_DEPRECATED
boost::shared_ptr<torrent_plugin> TORRENT_EXPORT create_lt_trackers_plugin(torrent_handle const&, void*); boost::shared_ptr<torrent_plugin> TORRENT_EXPORT create_lt_trackers_plugin(torrent_handle const&, void*);
} }
#endif // TORRENT_DISABLE_EXTENSIONS #endif // TORRENT_DISABLE_EXTENSIONS
#endif // TORRENT_NO_DEPRECATE
#endif // TORRENT_LT_TRACKERS_HPP_INCLUDED #endif // TORRENT_LT_TRACKERS_HPP_INCLUDED

View File

@ -308,6 +308,7 @@ TORRENT_TEST(stop_start_seed_graceful)
test_stop_start_download(swarm_test::upload, true); test_stop_start_download(swarm_test::upload, true);
} }
#ifndef TORRENT_NO_DEPRECATE
TORRENT_TEST(explicit_cache) TORRENT_TEST(explicit_cache)
{ {
setup_swarm(2, swarm_test::download setup_swarm(2, swarm_test::download
@ -333,6 +334,7 @@ TORRENT_TEST(explicit_cache)
return true; return true;
}); });
} }
#endif
TORRENT_TEST(shutdown) TORRENT_TEST(shutdown)
{ {

View File

@ -30,6 +30,10 @@ POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "test.hpp"
#ifndef TORRENT_NO_DEPRECATE
#include "setup_swarm.hpp" #include "setup_swarm.hpp"
#include "libtorrent/alert.hpp" #include "libtorrent/alert.hpp"
#include "libtorrent/announce_entry.hpp" #include "libtorrent/announce_entry.hpp"
@ -38,7 +42,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/alert_types.hpp" #include "libtorrent/alert_types.hpp"
#include "libtorrent/extensions/lt_trackers.hpp" #include "libtorrent/extensions/lt_trackers.hpp"
#include "libtorrent/session.hpp" #include "libtorrent/session.hpp"
#include "test.hpp"
#include "settings.hpp" #include "settings.hpp"
using namespace libtorrent; using namespace libtorrent;
@ -153,4 +156,7 @@ TORRENT_TEST(no_metadata)
TEST_EQUAL(connected, true); TEST_EQUAL(connected, true);
} }
#else
TORRENT_TEST(dummy) {}
#endif

View File

@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef TORRENT_NO_DEPRECATE
#ifndef TORRENT_DISABLE_EXTENSIONS #ifndef TORRENT_DISABLE_EXTENSIONS
#include "libtorrent/aux_/disable_warnings_push.hpp" #include "libtorrent/aux_/disable_warnings_push.hpp"
@ -390,4 +391,5 @@ namespace libtorrent
} }
#endif #endif
#endif