forked from premiere/premiere-libtorrent
set alert_mask early
This commit is contained in:
parent
15b6888eb3
commit
2741563711
|
@ -128,7 +128,8 @@ namespace libtorrent {
|
|||
class TORRENT_EXPORT alert_manager
|
||||
{
|
||||
public:
|
||||
alert_manager(io_service& ios, int queue_limit);
|
||||
alert_manager(io_service& ios, int queue_limit
|
||||
, boost::uint32_t alert_mask = alert::error_notification);
|
||||
~alert_manager();
|
||||
|
||||
void post_alert(const alert& alert_);
|
||||
|
|
|
@ -191,6 +191,7 @@ namespace libtorrent
|
|||
std::pair<int, int> listen_port_range
|
||||
, fingerprint const& cl_fprint
|
||||
, char const* listen_interface
|
||||
, boost::uint32_t alert_mask
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
, std::string const& logpath
|
||||
#endif
|
||||
|
|
|
@ -331,8 +331,8 @@ namespace libtorrent {
|
|||
|
||||
|
||||
|
||||
alert_manager::alert_manager(io_service& ios, int queue_limit)
|
||||
: m_alert_mask(alert::error_notification)
|
||||
alert_manager::alert_manager(io_service& ios, int queue_limit, boost::uint32_t alert_mask)
|
||||
: m_alert_mask(alert_mask)
|
||||
, m_queue_size_limit(queue_limit)
|
||||
, m_ios(ios)
|
||||
{}
|
||||
|
|
|
@ -381,12 +381,11 @@ namespace libtorrent
|
|||
void session::init(std::pair<int, int> listen_range, char const* listen_interface
|
||||
, fingerprint const& id, int flags, boost::uint32_t alert_mask TORRENT_LOGPATH_ARG)
|
||||
{
|
||||
m_impl.reset(new session_impl(listen_range, id, listen_interface TORRENT_LOGPATH));
|
||||
m_impl.reset(new session_impl(listen_range, id, listen_interface, alert_mask TORRENT_LOGPATH));
|
||||
|
||||
#ifdef TORRENT_MEMDEBUG
|
||||
start_malloc_debug();
|
||||
#endif
|
||||
set_alert_mask(alert_mask);
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
if (flags & add_default_plugins)
|
||||
{
|
||||
|
|
|
@ -466,6 +466,7 @@ namespace aux {
|
|||
std::pair<int, int> listen_port_range
|
||||
, fingerprint const& cl_fprint
|
||||
, char const* listen_interface
|
||||
, boost::uint32_t alert_mask
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
, std::string const& logpath
|
||||
#endif
|
||||
|
@ -482,7 +483,7 @@ namespace aux {
|
|||
#ifdef TORRENT_USE_OPENSSL
|
||||
, m_ssl_ctx(m_io_service, asio::ssl::context::sslv23_client)
|
||||
#endif
|
||||
, m_alerts(m_io_service, m_settings.alert_queue_size)
|
||||
, m_alerts(m_io_service, m_settings.alert_queue_size, alert_mask)
|
||||
, m_disk_thread(m_io_service, boost::bind(&session_impl::on_disk_queue, this), m_files)
|
||||
, m_half_open(m_io_service)
|
||||
, m_download_rate(peer_connection::download_channel)
|
||||
|
|
|
@ -501,7 +501,7 @@ int test_main()
|
|||
|
||||
// test external ip voting
|
||||
aux::session_impl* ses = new aux::session_impl(std::pair<int, int>(0,0)
|
||||
, fingerprint("LT", 0, 0, 0, 0), "0.0.0.0"
|
||||
, fingerprint("LT", 0, 0, 0, 0), "0.0.0.0", 0
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
, ""
|
||||
#endif
|
||||
|
@ -524,7 +524,7 @@ int test_main()
|
|||
#endif
|
||||
delete ses;
|
||||
ses = new aux::session_impl(std::pair<int, int>(0,0)
|
||||
, fingerprint("LT", 0, 0, 0, 0), "0.0.0.0"
|
||||
, fingerprint("LT", 0, 0, 0, 0), "0.0.0.0", 0
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
, ""
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue