Browse Source

use the right torrent port from the start, not need to change it later

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
4513fee3e5
  1. 4
      libtorrent/include/libtorrent/session.hpp
  2. 3
      src/twister.cpp

4
libtorrent/include/libtorrent/session.hpp

@ -139,11 +139,11 @@ namespace libtorrent @@ -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<int, int> 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

3
src/twister.cpp

@ -149,7 +149,8 @@ void ThreadWaitExtIP() @@ -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<char> in;
boost::filesystem::path sesStatePath = GetDataDir() / "ses_state";

Loading…
Cancel
Save