From b437e2c7432f6c81f10172c8bf9854db94238ed2 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 21 Jul 2009 04:42:19 +0000 Subject: [PATCH] fixed get_ip_filter --- src/session.cpp | 3 ++- src/session_impl.cpp | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/session.cpp b/src/session.cpp index b1746e7b5..152a0a74f 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -390,7 +390,8 @@ namespace libtorrent ip_filter const& session::get_ip_filter() const { - m_impl->get_ip_filter(); + session_impl::mutex_t::scoped_lock l(m_impl->m_mutex); + return m_impl->get_ip_filter(); } void session::set_port_filter(port_filter const& f) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index ef3d39d11..4edb7cf9d 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -622,8 +622,7 @@ namespace aux { ip_filter const& session_impl::get_ip_filter() const { - mutex_t::scoped_lock l(m_mutex); - return m_ip_filter; + return m_ip_filter; } void session_impl::set_settings(session_settings const& s)