diff --git a/src/ip_notifier.cpp b/src/ip_notifier.cpp index 8594b929f..3b19be07d 100644 --- a/src/ip_notifier.cpp +++ b/src/ip_notifier.cpp @@ -91,7 +91,7 @@ namespace libtorrent { cb(error_code(err, system_category())); }); } #else - TORRENT_UNUSED(cb); + cb(make_error_code(boost::system::errc::not_supported)); #endif } diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 9f1ed768d..39f75d120 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -477,7 +477,7 @@ namespace aux { template void session_impl::wrap(Fun f, Args&&... a) #ifndef BOOST_NO_EXCEPTIONS - try + try #endif { (this->*f)(std::forward(a)...); @@ -1763,6 +1763,12 @@ namespace aux { void session_impl::on_ip_change(error_code const& ec) { +#ifndef TORRENT_DISABLE_LOGGING + if (!ec) + session_log("received ip change from internal ip_notifier"); + else + session_log("received error on_ip_change: %d, %s", ec.value(), ec.message().c_str()); +#endif if (ec || m_abort) return; m_ip_notifier.async_wait([this] (error_code const& e) { this->wrap(&session_impl::on_ip_change, e); }); @@ -1778,7 +1784,7 @@ namespace aux { TORRENT_ASSERT(is_single_thread()); TORRENT_ASSERT(!m_abort); - int flags = m_settings.get_bool(settings_pack::listen_system_port_fallback) + int const flags = m_settings.get_bool(settings_pack::listen_system_port_fallback) ? 0 : listen_no_system_port; m_stats_counters.set_value(counters::has_incoming_connections, 0); @@ -1871,7 +1877,7 @@ namespace aux { #ifndef TORRENT_DISABLE_LOGGING if (should_log()) { - session_log("Closing listen socket for %s on device \"%s\"" + session_log("closing listen socket for %s on device \"%s\"" , print_endpoint(remove_iter->local_endpoint).c_str() , remove_iter->device.c_str()); }