From 54bba4d74c38138a15b2b6178acbe4a271a18be2 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Fri, 23 Nov 2007 21:18:26 +0000 Subject: [PATCH] fix for when lsd/natpmp/upnp are started twice --- libtorrent/src/session_impl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 9b3e667a5..3c8625fef 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -2279,6 +2279,8 @@ namespace detail INVARIANT_CHECK; + if (m_lsd) return; + m_lsd = new lsd(m_io_service , m_listen_interface.address() , bind(&session_impl::on_lsd_peer, this, _1, _2)); @@ -2290,6 +2292,8 @@ namespace detail INVARIANT_CHECK; + if (m_natpmp) return; + m_natpmp = new natpmp(m_io_service , m_listen_interface.address() , bind(&session_impl::on_port_mapping @@ -2308,6 +2312,8 @@ namespace detail INVARIANT_CHECK; + if (m_upnp) return; + m_upnp = new upnp(m_io_service, m_half_open , m_listen_interface.address() , m_settings.user_agent