forked from premiere/premiere-libtorrent
fix python build
This commit is contained in:
parent
332799bff2
commit
87b64f083a
|
@ -5,6 +5,7 @@
|
|||
#include <boost/python.hpp>
|
||||
#include <libtorrent/alert.hpp>
|
||||
#include <libtorrent/alert_types.hpp>
|
||||
#include <libtorrent/piece_picker.hpp> // for piece_block
|
||||
#include <memory>
|
||||
|
||||
using namespace boost::python;
|
||||
|
@ -422,6 +423,8 @@ void bind_alert()
|
|||
.def_readonly("map_type", &portmap_alert::map_type)
|
||||
;
|
||||
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
|
||||
class_<portmap_log_alert, bases<alert>, noncopyable>(
|
||||
"portmap_log_alert", no_init)
|
||||
.def_readonly("map_type", &portmap_log_alert::map_type)
|
||||
|
@ -431,6 +434,8 @@ void bind_alert()
|
|||
#endif
|
||||
;
|
||||
|
||||
#endif // TORRENT_DISABLE_LOGGING
|
||||
|
||||
class_<fastresume_rejected_alert, bases<torrent_alert>, noncopyable>(
|
||||
"fastresume_rejected_alert", no_init)
|
||||
.def_readonly("error", &fastresume_rejected_alert::error)
|
||||
|
@ -665,6 +670,8 @@ void bind_alert()
|
|||
.add_property("ip", &dht_outgoing_get_peers_alert_ip)
|
||||
;
|
||||
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
|
||||
class_<log_alert, bases<alert>, noncopyable>(
|
||||
"log_alert", no_init)
|
||||
.def("msg", &log_alert::msg)
|
||||
|
@ -680,6 +687,14 @@ void bind_alert()
|
|||
.def("msg", &peer_log_alert::msg)
|
||||
;
|
||||
|
||||
class_<picker_log_alert, bases<peer_alert>, noncopyable>(
|
||||
"picker_log_alert", no_init)
|
||||
.add_property("picker_flags", &picker_log_alert::picker_flags)
|
||||
.def("blocks", &picker_log_alert::blocks)
|
||||
;
|
||||
|
||||
#endif // TORRENT_DISABLE_LOGGING
|
||||
|
||||
class_<lsd_error_alert, bases<alert>, noncopyable>(
|
||||
"lsd_error_alert", no_init)
|
||||
.def_readonly("error", &lsd_error_alert::error)
|
||||
|
|
|
@ -5311,6 +5311,7 @@ retry:
|
|||
m_alerts.emplace_alert<lsd_peer_alert>(t->get_handle(), peer);
|
||||
}
|
||||
|
||||
// TODO: perhaps this function should not exist when logging is disabled
|
||||
void session_impl::on_port_map_log(
|
||||
char const* msg, int map_transport)
|
||||
{
|
||||
|
@ -5319,6 +5320,9 @@ retry:
|
|||
// log message
|
||||
if (m_alerts.should_post<portmap_log_alert>())
|
||||
m_alerts.emplace_alert<portmap_log_alert>(map_transport, msg);
|
||||
#else
|
||||
TORRENT_UNUSED(msg);
|
||||
TORRENT_UNUSED(map_transport);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue