diff --git a/ChangeLog b/ChangeLog index b0fbb610c..2cf8a9902 100644 --- a/ChangeLog +++ b/ChangeLog @@ -61,6 +61,7 @@ incoming connection * added more detailed instrumentation of the disk I/O thread + * fixed python bindings for tcp::endpoint * fixed edge case of pad file support * limit number of torrents tracked by DHT * fixed bug when allow_multiple_connections_per_ip was enabled diff --git a/bindings/python/src/alert.cpp b/bindings/python/src/alert.cpp index 17c7a5d9f..619f456a0 100644 --- a/bindings/python/src/alert.cpp +++ b/bindings/python/src/alert.cpp @@ -15,8 +15,18 @@ std::string get_buffer(read_piece_alert const& rpa) : std::string(); } +struct endpoint_to_python +{ + static PyObject* convert(tcp::endpoint const& ep) + { + return incref(make_tuple(ep.address().to_string(), ep.port()).ptr()); + } +}; + void bind_alert() { + to_python_converter(); + using boost::noncopyable; { @@ -52,6 +62,7 @@ void bind_alert() .value("progress_notification", alert::progress_notification) .value("ip_block_notification", alert::ip_block_notification) .value("performance_warning", alert::performance_warning) + .value("stats_notification", alert::stats_notification) .value("all_categories", alert::all_categories) ;