Merge pull request #501 from ssiloti/RC_1_1

set enable_dht to true in session::start_dht(entry)
This commit is contained in:
Arvid Norberg 2016-02-26 23:12:04 -05:00
commit 765c7f8c0c
3 changed files with 8 additions and 1 deletions

View File

@ -327,6 +327,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
entry dht_state() const;
void start_dht_deprecated(entry const& startup_state);
#endif
void on_dht_announce(error_code const& e);
void on_dht_name_lookup(error_code const& e

View File

@ -468,7 +468,7 @@ namespace libtorrent
void session_handle::start_dht(entry const& startup_state)
{
#ifndef TORRENT_DISABLE_DHT
TORRENT_ASYNC_CALL1(start_dht, startup_state);
TORRENT_ASYNC_CALL1(start_dht_deprecated, startup_state);
#else
TORRENT_UNUSED(startup_state);
#endif

View File

@ -5704,6 +5704,12 @@ retry:
if (!m_dht) return entry();
return m_dht->state();
}
void session_impl::start_dht_deprecated(entry const& startup_state)
{
m_settings.set_bool(settings_pack::enable_dht, true);
start_dht(startup_state);
}
#endif
void session_impl::add_dht_node_name(std::pair<std::string, int> const& node)