fixed broadcast_lsd option. in trunk, redefined it to only broadcast every 8th packet
This commit is contained in:
@@ -251,14 +251,17 @@ setup_transfer(session* ses1, session* ses2, session* ses3
|
||||
, bool clear_files, bool use_metadata_transfer, bool connect_peers
|
||||
, std::string suffix, int piece_size
|
||||
, boost::intrusive_ptr<torrent_info>* torrent, bool super_seeding
|
||||
, add_torrent_params const* p)
|
||||
, add_torrent_params const* p, bool stop_lsd)
|
||||
{
|
||||
assert(ses1);
|
||||
assert(ses2);
|
||||
|
||||
ses1->stop_lsd();
|
||||
ses2->stop_lsd();
|
||||
if (ses3) ses3->stop_lsd();
|
||||
if (stop_lsd)
|
||||
{
|
||||
ses1->stop_lsd();
|
||||
ses2->stop_lsd();
|
||||
if (ses3) ses3->stop_lsd();
|
||||
}
|
||||
|
||||
session_settings sess_set = ses1->settings();
|
||||
if (ses3) sess_set.allow_multiple_connections_per_ip = true;
|
||||
|
@@ -61,7 +61,7 @@ setup_transfer(libtorrent::session* ses1, libtorrent::session* ses2
|
||||
, libtorrent::session* ses3, bool clear_files, bool use_metadata_transfer = true
|
||||
, bool connect = true, std::string suffix = "", int piece_size = 16 * 1024
|
||||
, boost::intrusive_ptr<libtorrent::torrent_info>* torrent = 0, bool super_seeding = false
|
||||
, libtorrent::add_torrent_params const* p = 0);
|
||||
, libtorrent::add_torrent_params const* p = 0, bool stop_lsd = true);
|
||||
|
||||
int start_web_server(bool ssl = false, bool chunked = false);
|
||||
void stop_web_server();
|
||||
|
@@ -58,7 +58,8 @@ void test_lsd()
|
||||
torrent_handle tor2;
|
||||
|
||||
using boost::tuples::ignore;
|
||||
boost::tie(tor1, tor2, ignore) = setup_transfer(&ses1, &ses2, 0, true, false, false, "_lsd");
|
||||
boost::tie(tor1, tor2, ignore) = setup_transfer(&ses1, &ses2, 0, true, false, false, "_lsd"
|
||||
, 16 * 1024, 0, false, 0, false);
|
||||
|
||||
for (int i = 0; i < 30; ++i)
|
||||
{
|
||||
|
Reference in New Issue
Block a user