diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-18 05:18:12 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-18 05:18:12 +0000 |
commit | 3a77185e1e69c9943a789264ba646d6da5f0d6ef (patch) | |
tree | d3e02db69c1b0a9d5dd7cd2f408f92d6546b9387 | |
parent | 63fa4601fbd1d5a1263f5fc71f31ef96a3e0af68 (diff) | |
download | deluge-3a77185e1e69c9943a789264ba646d6da5f0d6ef.tar.gz deluge-3a77185e1e69c9943a789264ba646d6da5f0d6ef.tar.bz2 deluge-3a77185e1e69c9943a789264ba646d6da5f0d6ef.zip |
reanable lsd with custom fix to lt
-rw-r--r-- | libtorrent/src/lsd.cpp | 2 | ||||
-rwxr-xr-x | libtorrent/src/session_impl.cpp | 2 | ||||
-rw-r--r-- | src/deluge_core.cpp | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/libtorrent/src/lsd.cpp b/libtorrent/src/lsd.cpp index 06e570f3c..f4bee3610 100644 --- a/libtorrent/src/lsd.cpp +++ b/libtorrent/src/lsd.cpp @@ -183,9 +183,9 @@ void lsd::on_announce(udp::endpoint const& from, char* buffer void lsd::close() { - m_socket.close(); m_broadcast_timer.cancel(); m_disabled = true; m_callback.clear(); + m_socket.close(); } diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index c41079fdc..3132b80c9 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -2317,6 +2317,8 @@ namespace detail void session_impl::stop_lsd() { mutex_t::scoped_lock l(m_mutex); + if (m_lsd.get()) + m_lsd->close(); m_lsd = 0; } diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index c4f9a797d..39730c851 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -1642,13 +1642,12 @@ static PyObject *torrent_use_lsd(PyObject *self, PyObject *args) python_long action; PyArg_ParseTuple(args, "i", &action); -/* if (action){ + if (action){ M_ses->start_lsd(); } else{ M_ses->stop_lsd(); } -*/ Py_INCREF(Py_None); return Py_None; } |