mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 01:18:39 +00:00
reanable lsd with custom fix to lt
This commit is contained in:
parent
63fa4601fb
commit
3a77185e1e
3 changed files with 4 additions and 3 deletions
|
@ -183,9 +183,9 @@ void lsd::on_announce(udp::endpoint const& from, char* buffer
|
||||||
|
|
||||||
void lsd::close()
|
void lsd::close()
|
||||||
{
|
{
|
||||||
m_socket.close();
|
|
||||||
m_broadcast_timer.cancel();
|
m_broadcast_timer.cancel();
|
||||||
m_disabled = true;
|
m_disabled = true;
|
||||||
m_callback.clear();
|
m_callback.clear();
|
||||||
|
m_socket.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2317,6 +2317,8 @@ namespace detail
|
||||||
void session_impl::stop_lsd()
|
void session_impl::stop_lsd()
|
||||||
{
|
{
|
||||||
mutex_t::scoped_lock l(m_mutex);
|
mutex_t::scoped_lock l(m_mutex);
|
||||||
|
if (m_lsd.get())
|
||||||
|
m_lsd->close();
|
||||||
m_lsd = 0;
|
m_lsd = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1642,13 +1642,12 @@ static PyObject *torrent_use_lsd(PyObject *self, PyObject *args)
|
||||||
python_long action;
|
python_long action;
|
||||||
PyArg_ParseTuple(args, "i", &action);
|
PyArg_ParseTuple(args, "i", &action);
|
||||||
|
|
||||||
/* if (action){
|
if (action){
|
||||||
M_ses->start_lsd();
|
M_ses->start_lsd();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
M_ses->stop_lsd();
|
M_ses->stop_lsd();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
Py_INCREF(Py_None); return Py_None;
|
Py_INCREF(Py_None); return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue