reanable lsd with custom fix to lt

This commit is contained in:
Marcos Pinto 2007-11-18 05:18:12 +00:00
parent 63fa4601fb
commit 3a77185e1e
3 changed files with 4 additions and 3 deletions

View File

@ -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();
}

View File

@ -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;
}

View File

@ -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;
}