damn peer block

This commit is contained in:
Marcos Pinto 2007-08-02 18:44:27 +00:00
parent b7b31804c1
commit d7379227ab
1 changed files with 0 additions and 16 deletions

View File

@ -86,7 +86,6 @@ using namespace libtorrent;
#define EVENT_PIECE_FINISHED 15 #define EVENT_PIECE_FINISHED 15
#define EVENT_BLOCK_DOWNLOADING 16 #define EVENT_BLOCK_DOWNLOADING 16
#define EVENT_BLOCK_FINISHED 17 #define EVENT_BLOCK_FINISHED 17
#define EVENT_PEER_BLOCKED 18
#define STATE_QUEUED 0 #define STATE_QUEUED 0
#define STATE_CHECKING 1 #define STATE_CHECKING 1
@ -1113,21 +1112,6 @@ static PyObject *torrent_pop_event(PyObject *self, PyObject *args)
"message", a->msg().c_str()); "message", a->msg().c_str());
else else
{ Py_INCREF(Py_None); return Py_None; } { Py_INCREF(Py_None); return Py_None; }
} else if (dynamic_cast<peer_blocked_alert*>(popped_alert))
{
torrent_handle handle = (dynamic_cast<peer_blocked_alert*>(popped_alert))->handle;
long index = get_torrent_index(handle);
if (PyErr_Occurred())
return NULL;
if (handle_exists(handle))
return Py_BuildValue("{s:i,s:i,s:i,s:s}",
"event_type", EVENT_PEER_BLOCKED,
"unique_ID", M_torrents->at(index).unique_ID,
"peer_ip", ip,
"message", a->msg().c_str());
else
{ Py_INCREF(Py_None); return Py_None; }
} else if (dynamic_cast<tracker_warning_alert*>(popped_alert)) } else if (dynamic_cast<tracker_warning_alert*>(popped_alert))
{ {
torrent_handle handle = (dynamic_cast<tracker_warning_alert*>(popped_alert))->handle; torrent_handle handle = (dynamic_cast<tracker_warning_alert*>(popped_alert))->handle;