diff --git a/libtorrent/include/libtorrent/session.hpp b/libtorrent/include/libtorrent/session.hpp index f241a5fa..e4b2dc2e 100644 --- a/libtorrent/include/libtorrent/session.hpp +++ b/libtorrent/include/libtorrent/session.hpp @@ -139,11 +139,11 @@ namespace libtorrent , LIBTORRENT_VERSION_MAJOR, LIBTORRENT_VERSION_MINOR, 0, 0) , int flags = start_default_features | add_default_plugins , boost::uint32_t alert_mask = alert::error_notification - , char const* ext_ip = NULL + , char const* ext_ip = NULL, std::pair listen_range = std::make_pair(0, 0) TORRENT_LOGPATH_ARG_DEFAULT) { TORRENT_CFG(); - init(std::make_pair(0, 0), "0.0.0.0", print, alert_mask, ext_ip); + init(listen_range, "0.0.0.0", print, alert_mask, ext_ip); #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING set_log_path(logpath); #endif diff --git a/src/twister.cpp b/src/twister.cpp index 2d3a762c..0ac23d3e 100644 --- a/src/twister.cpp +++ b/src/twister.cpp @@ -149,7 +149,8 @@ void ThreadWaitExtIP() ses = new session(fingerprint("TW", LIBTORRENT_VERSION_MAJOR, LIBTORRENT_VERSION_MINOR, 0, 0) , session::add_default_plugins , alert::dht_notification - , ipStr.size() ? ipStr.c_str() : NULL ); + , ipStr.size() ? ipStr.c_str() : NULL + , std::make_pair(listen_port, listen_port)); std::vector in; boost::filesystem::path sesStatePath = GetDataDir() / "ses_state";