From: alex Date: Sat, 31 Jul 2021 23:42:53 +0000 (-0700) Subject: updated for libtorrent-rasterbar 1.2.9 X-Git-Tag: v1.1.0~1 X-Git-Url: http://git.infiniteadaptability.org/?a=commitdiff_plain;h=d3b51c1d6ef4f134acd2e5e67f9e4182d120d214;p=seeder updated for libtorrent-rasterbar 1.2.9 --- diff --git a/configure.ac b/configure.ac index 032b394..2310844 100644 --- a/configure.ac +++ b/configure.ac @@ -77,8 +77,6 @@ AC_PROG_LN_S # Checks for libraries. AC_CHECK_LIB([torrent-rasterbar], [main],,AC_MSG_ERROR(libtorrent-rasterbar required)) -AC_CHECK_LIB([boost_system], [main],,AC_MSG_ERROR(boost_system required)) -AC_CHECK_LIB([pthread], [main],,AC_MSG_ERROR(pthread required)) # Checks for header files. AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) diff --git a/seederd/inc/seed.hpp b/seederd/inc/seed.hpp index 85b99dc..381c2bd 100644 --- a/seederd/inc/seed.hpp +++ b/seederd/inc/seed.hpp @@ -2,8 +2,8 @@ #define __SEED_HPP_ #include +#include -#include #include #include @@ -14,8 +14,8 @@ class seed { seed(lt::session& session, std::string torrent_filepath, std::string data_path) { lt::add_torrent_params params; params.save_path = data_path; - params.ti = boost::make_shared(torrent_filepath,0); - params.flags = lt::add_torrent_params::flag_seed_mode; + params.ti = std::make_shared(torrent_filepath); + params.flags = lt::torrent_flags::seed_mode; session.async_add_torrent(params); } diff --git a/seederd/src/main.cpp b/seederd/src/main.cpp index e7b3383..fcb8b38 100644 --- a/seederd/src/main.cpp +++ b/seederd/src/main.cpp @@ -62,8 +62,10 @@ int main(int argc, char **argv) try { fs::create_directories(TORRENTDIR); std::cout << "created " << TORRENTDIR << std::endl; - lt::settings_pack settings; - lt::high_performance_seed(settings); + lt::session_params params; + auto& settings = params.settings; + + settings = lt::high_performance_seed(); settings.set_int(lt::settings_pack::active_seeds,-1); settings.set_int(lt::settings_pack::active_limit,-1); settings.set_str(lt::settings_pack::listen_interfaces,"0.0.0.0:6881"); @@ -75,7 +77,6 @@ int main(int argc, char **argv) try { & ~(lt::alert::dht_notification + lt::alert::piece_progress_notification + lt::alert::block_progress_notification - + lt::alert::progress_notification + lt::alert::stats_notification + lt::alert::session_log_notification + lt::alert::torrent_log_notification @@ -85,7 +86,7 @@ int main(int argc, char **argv) try { )); } - lt::session session(settings); + lt::session session(params); init(session);