forked from premiere/premiere-libtorrent
Add get_ip_filter() to session
This commit is contained in:
parent
a3bacd736e
commit
c401c65dfb
|
@ -82,6 +82,7 @@ release 0.14.5
|
|||
disabled
|
||||
* fixed race condition in UPnP which could lead to crash
|
||||
* fixed inversed seed_time ratio logic
|
||||
* added get_ip_filter() to session
|
||||
|
||||
release 0.14.4
|
||||
|
||||
|
|
|
@ -332,6 +332,7 @@ void bind_session()
|
|||
.def("start_natpmp", &start_natpmp)
|
||||
.def("stop_natpmp", allow_threads(&session::stop_natpmp))
|
||||
.def("set_ip_filter", allow_threads(&session::set_ip_filter))
|
||||
.def("get_ip_filter", allow_threads(&session::get_ip_filter), return_value_policy<copy_const_reference>())
|
||||
.def("find_torrent", allow_threads(&session::find_torrent))
|
||||
.def("get_torrents", &get_torrents)
|
||||
.def("pause", allow_threads(&session::pause))
|
||||
|
|
|
@ -184,6 +184,7 @@ The ``session`` class has the following synopsis::
|
|||
entry state() const;
|
||||
|
||||
void set_ip_filter(ip_filter const& f);
|
||||
ip_filter const& get_ip_filter() const;
|
||||
|
||||
session_status status() const;
|
||||
cache_status get_cache_status() const;
|
||||
|
@ -628,6 +629,14 @@ accepted and not, see ip_filter_.
|
|||
Each time a peer is blocked because of the IP filter, a peer_blocked_alert_ is
|
||||
generated.
|
||||
|
||||
get_ip_filter()
|
||||
---------------
|
||||
|
||||
::
|
||||
ip_filter const& get_ip_filter() const;
|
||||
|
||||
Returns the ip_filter currently in the session. See ip_filter_.
|
||||
|
||||
|
||||
status()
|
||||
--------
|
||||
|
|
|
@ -204,6 +204,8 @@ namespace libtorrent
|
|||
void resume();
|
||||
|
||||
void set_ip_filter(ip_filter const& f);
|
||||
ip_filter const& get_ip_filter() const;
|
||||
|
||||
void set_port_filter(port_filter const& f);
|
||||
|
||||
bool listen_on(
|
||||
|
|
|
@ -308,6 +308,8 @@ namespace libtorrent
|
|||
entry state() const;
|
||||
|
||||
void set_ip_filter(ip_filter const& f);
|
||||
ip_filter const& get_ip_filter() const;
|
||||
|
||||
void set_port_filter(port_filter const& f);
|
||||
void set_peer_id(peer_id const& pid);
|
||||
void set_key(int key);
|
||||
|
|
|
@ -388,6 +388,11 @@ namespace libtorrent
|
|||
m_impl->set_ip_filter(f);
|
||||
}
|
||||
|
||||
ip_filter const& session::get_ip_filter() const
|
||||
{
|
||||
m_impl->get_ip_filter();
|
||||
}
|
||||
|
||||
void session::set_port_filter(port_filter const& f)
|
||||
{
|
||||
session_impl::mutex_t::scoped_lock l(m_impl->m_mutex);
|
||||
|
|
|
@ -620,6 +620,12 @@ namespace aux {
|
|||
i->second->ip_filter_updated();
|
||||
}
|
||||
|
||||
ip_filter const& session_impl::get_ip_filter() const
|
||||
{
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
return m_ip_filter;
|
||||
}
|
||||
|
||||
void session_impl::set_settings(session_settings const& s)
|
||||
{
|
||||
INVARIANT_CHECK;
|
||||
|
|
Loading…
Reference in New Issue