fix some warnings
This commit is contained in:
parent
54e483647c
commit
16bb2de6ed
|
@ -114,11 +114,11 @@ typedef uint8_t UTF8;
|
||||||
typedef unsigned char Boolean; /* 0 or 1 */
|
typedef unsigned char Boolean; /* 0 or 1 */
|
||||||
|
|
||||||
/* Some fundamental constants */
|
/* Some fundamental constants */
|
||||||
#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
|
#define UNI_REPLACEMENT_CHAR UTF32(0x0000FFFD)
|
||||||
#define UNI_MAX_BMP (UTF32)0x0000FFFF
|
#define UNI_MAX_BMP UTF32(0x0000FFFF)
|
||||||
#define UNI_MAX_UTF16 (UTF32)0x0010FFFF
|
#define UNI_MAX_UTF16 UTF32(0x0010FFFF)
|
||||||
#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF
|
#define UNI_MAX_UTF32 UTF32(0x7FFFFFFF)
|
||||||
#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
|
#define UNI_MAX_LEGAL_UTF32 UTF32(0x0010FFFF)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
conversionOK, /* conversion successful */
|
conversionOK, /* conversion successful */
|
||||||
|
|
|
@ -237,15 +237,15 @@ namespace libtorrent { namespace
|
||||||
if (need_encoding(e.url.c_str(), e.url.size())) continue;
|
if (need_encoding(e.url.c_str(), e.url.size())) continue;
|
||||||
|
|
||||||
// ignore invalid URLs
|
// ignore invalid URLs
|
||||||
error_code ec;
|
error_code err;
|
||||||
std::string protocol;
|
std::string protocol;
|
||||||
std::string auth;
|
std::string auth;
|
||||||
std::string hostname;
|
std::string hostname;
|
||||||
int port;
|
int port;
|
||||||
std::string path;
|
std::string path;
|
||||||
boost::tie(protocol, auth, hostname, port, path)
|
boost::tie(protocol, auth, hostname, port, path)
|
||||||
= parse_url_components(e.url, ec);
|
= parse_url_components(e.url, err);
|
||||||
if (ec) continue;
|
if (err) continue;
|
||||||
|
|
||||||
// ignore unknown protocols
|
// ignore unknown protocols
|
||||||
if (protocol != "udp" && protocol != "http" && protocol != "https")
|
if (protocol != "udp" && protocol != "http" && protocol != "https")
|
||||||
|
@ -273,7 +273,8 @@ namespace libtorrent { namespace
|
||||||
|
|
||||||
virtual void tick()
|
virtual void tick()
|
||||||
{
|
{
|
||||||
if (!m_message_index) return; // no handshake yet
|
// no handshake yet
|
||||||
|
if (!m_message_index) return;
|
||||||
if (++m_2_minutes <= 120) return;
|
if (++m_2_minutes <= 120) return;
|
||||||
m_2_minutes = 0;
|
m_2_minutes = 0;
|
||||||
|
|
||||||
|
|
|
@ -4668,8 +4668,8 @@ retry:
|
||||||
{
|
{
|
||||||
torrent_info::nodes_t const& nodes = params.ti->nodes();
|
torrent_info::nodes_t const& nodes = params.ti->nodes();
|
||||||
std::for_each(nodes.begin(), nodes.end(), boost::bind(
|
std::for_each(nodes.begin(), nodes.end(), boost::bind(
|
||||||
(void(dht::dht_tracker::*)(std::pair<std::string, int> const&))
|
static_cast<void(dht::dht_tracker::*)(std::pair<std::string, int> const&)>(
|
||||||
&dht::dht_tracker::add_node
|
&dht::dht_tracker::add_node)
|
||||||
, boost::ref(m_dht), _1));
|
, boost::ref(m_dht), _1));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -6515,7 +6515,7 @@ retry:
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
vsnprintf(buf, sizeof(buf), fmt, v);
|
vsnprintf(buf, sizeof(buf), fmt, v);
|
||||||
va_end(v);
|
va_end(v);
|
||||||
m_alerts.emplace_alert<dht_log_alert>((dht_log_alert::dht_module_t)m, buf);
|
m_alerts.emplace_alert<dht_log_alert>(static_cast<dht_log_alert::dht_module_t>(m), buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void session_impl::log_packet(message_direction_t dir, char const* pkt, int len
|
void session_impl::log_packet(message_direction_t dir, char const* pkt, int len
|
||||||
|
|
|
@ -149,7 +149,7 @@ namespace libtorrent
|
||||||
size += bufs->iov_len;
|
size += bufs->iov_len;
|
||||||
if (size >= bytes)
|
if (size >= bytes)
|
||||||
{
|
{
|
||||||
((char*&)bufs->iov_base) += bufs->iov_len - (size - bytes);
|
reinterpret_cast<char*&>(bufs->iov_base) += bufs->iov_len - (size - bytes);
|
||||||
bufs->iov_len = size - bytes;
|
bufs->iov_len = size - bytes;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -720,7 +720,7 @@ namespace libtorrent
|
||||||
TORRENT_ASSERT(slot >= 0);
|
TORRENT_ASSERT(slot >= 0);
|
||||||
TORRENT_ASSERT(slot < files().num_pieces());
|
TORRENT_ASSERT(slot < files().num_pieces());
|
||||||
|
|
||||||
boost::int64_t file_offset = (boost::int64_t)slot * files().piece_length();
|
boost::int64_t file_offset = boost::int64_t(slot) * files().piece_length();
|
||||||
int file_index = 0;
|
int file_index = 0;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
|
@ -1064,8 +1064,8 @@ namespace libtorrent
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// ignore errors when removing
|
// ignore errors when removing
|
||||||
error_code e;
|
error_code ignore;
|
||||||
remove_all(old_path, e);
|
remove_all(old_path, ignore);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1270,8 +1270,8 @@ namespace libtorrent
|
||||||
write_access_log(adjusted_offset, handle->file_id(), op_start | flags, clock_type::now());
|
write_access_log(adjusted_offset, handle->file_id(), op_start | flags, clock_type::now());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bytes_transferred = (int)((*handle).*op.op)(adjusted_offset
|
bytes_transferred = int(((*handle).*op.op)(adjusted_offset
|
||||||
, tmp_bufs, num_tmp_bufs, e, op.mode);
|
, tmp_bufs, num_tmp_bufs, e, op.mode));
|
||||||
|
|
||||||
// we either get an error or 0 or more bytes read
|
// we either get an error or 0 or more bytes read
|
||||||
TORRENT_ASSERT(e || bytes_transferred >= 0);
|
TORRENT_ASSERT(e || bytes_transferred >= 0);
|
||||||
|
@ -1431,6 +1431,7 @@ namespace libtorrent
|
||||||
|
|
||||||
storage_interface* disabled_storage_constructor(storage_params const& params)
|
storage_interface* disabled_storage_constructor(storage_params const& params)
|
||||||
{
|
{
|
||||||
|
TORRENT_UNUSED(params);
|
||||||
return new disabled_storage;
|
return new disabled_storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8380,7 +8380,7 @@ namespace libtorrent
|
||||||
|
|
||||||
TORRENT_ASSERT(index >= 0);
|
TORRENT_ASSERT(index >= 0);
|
||||||
TORRENT_ASSERT(index < int(m_trackers.size()));
|
TORRENT_ASSERT(index < int(m_trackers.size()));
|
||||||
if (index >= (int)m_trackers.size()) return -1;
|
if (index >= int(m_trackers.size())) return -1;
|
||||||
|
|
||||||
while (index > 0 && m_trackers[index].tier == m_trackers[index-1].tier)
|
while (index > 0 && m_trackers[index].tier == m_trackers[index-1].tier)
|
||||||
{
|
{
|
||||||
|
@ -8399,7 +8399,7 @@ namespace libtorrent
|
||||||
|
|
||||||
TORRENT_ASSERT(index >= 0);
|
TORRENT_ASSERT(index >= 0);
|
||||||
TORRENT_ASSERT(index < int(m_trackers.size()));
|
TORRENT_ASSERT(index < int(m_trackers.size()));
|
||||||
if (index >= (int)m_trackers.size()) return -1;
|
if (index >= int(m_trackers.size())) return -1;
|
||||||
|
|
||||||
while (index < int(m_trackers.size()) - 1 && m_trackers[index].tier == m_trackers[index + 1].tier)
|
while (index < int(m_trackers.size()) - 1 && m_trackers[index].tier == m_trackers[index + 1].tier)
|
||||||
{
|
{
|
||||||
|
@ -11318,7 +11318,6 @@ namespace libtorrent
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int num_files = m_torrent_file->num_files();
|
|
||||||
// if this is the first time the client asks for file progress.
|
// if this is the first time the client asks for file progress.
|
||||||
// allocate it and make sure it's up to date
|
// allocate it and make sure it's up to date
|
||||||
|
|
||||||
|
@ -11454,7 +11453,7 @@ namespace libtorrent
|
||||||
if (m_ses.alerts().should_post<state_changed_alert>())
|
if (m_ses.alerts().should_post<state_changed_alert>())
|
||||||
{
|
{
|
||||||
m_ses.alerts().emplace_alert<state_changed_alert>(get_handle()
|
m_ses.alerts().emplace_alert<state_changed_alert>(get_handle()
|
||||||
, s, (torrent_status::state_t)m_state);
|
, s, static_cast<torrent_status::state_t>(m_state));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s == torrent_status::finished
|
if (s == torrent_status::finished
|
||||||
|
@ -11600,7 +11599,7 @@ namespace libtorrent
|
||||||
st->time_since_download = m_last_download == (std::numeric_limits<boost::int16_t>::min)() ? -1
|
st->time_since_download = m_last_download == (std::numeric_limits<boost::int16_t>::min)() ? -1
|
||||||
: clamped_subtract(m_ses.session_time(), m_last_download);
|
: clamped_subtract(m_ses.session_time(), m_last_download);
|
||||||
|
|
||||||
st->storage_mode = (storage_mode_t)m_storage_mode;
|
st->storage_mode = static_cast<storage_mode_t>(m_storage_mode);
|
||||||
|
|
||||||
st->num_complete = (m_complete == 0xffffff) ? -1 : m_complete;
|
st->num_complete = (m_complete == 0xffffff) ? -1 : m_complete;
|
||||||
st->num_incomplete = (m_incomplete == 0xffffff) ? -1 : m_incomplete;
|
st->num_incomplete = (m_incomplete == 0xffffff) ? -1 : m_incomplete;
|
||||||
|
@ -11680,7 +11679,7 @@ namespace libtorrent
|
||||||
st->need_save_resume = need_save_resume_data();
|
st->need_save_resume = need_save_resume_data();
|
||||||
st->ip_filter_applies = m_apply_ip_filter;
|
st->ip_filter_applies = m_apply_ip_filter;
|
||||||
|
|
||||||
st->state = (torrent_status::state_t)m_state;
|
st->state = static_cast<torrent_status::state_t>(m_state);
|
||||||
|
|
||||||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||||
if (st->state == torrent_status::finished
|
if (st->state == torrent_status::finished
|
||||||
|
|
|
@ -588,7 +588,7 @@ namespace libtorrent
|
||||||
ec = errors::metadata_too_large;
|
ec = errors::metadata_too_large;
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
v.resize((unsigned int)s);
|
v.resize(std::size_t(s));
|
||||||
if (s == 0) return 0;
|
if (s == 0) return 0;
|
||||||
file::iovec_t b = {&v[0], size_t(s) };
|
file::iovec_t b = {&v[0], size_t(s) };
|
||||||
boost::int64_t read = f.readv(0, &b, 1, ec);
|
boost::int64_t read = f.readv(0, &b, 1, ec);
|
||||||
|
@ -1266,8 +1266,8 @@ namespace libtorrent
|
||||||
if (name.empty()) name = to_hex(m_info_hash.to_string());
|
if (name.empty()) name = to_hex(m_info_hash.to_string());
|
||||||
|
|
||||||
// extract file list
|
// extract file list
|
||||||
bdecode_node i = info.dict_find_list("files");
|
bdecode_node files_node = info.dict_find_list("files");
|
||||||
if (!i)
|
if (!files_node)
|
||||||
{
|
{
|
||||||
// if there's no list of files, there has to be a length
|
// if there's no list of files, there has to be a length
|
||||||
// field.
|
// field.
|
||||||
|
@ -1278,7 +1278,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!extract_files(i, files, name, info_ptr_diff, ec))
|
if (!extract_files(files_node, files, name, info_ptr_diff, ec))
|
||||||
return false;
|
return false;
|
||||||
m_multifile = true;
|
m_multifile = true;
|
||||||
}
|
}
|
||||||
|
@ -1521,13 +1521,13 @@ namespace libtorrent
|
||||||
#endif // TORRENT_DISABLE_MUTABLE_TORRENTS
|
#endif // TORRENT_DISABLE_MUTABLE_TORRENTS
|
||||||
|
|
||||||
// extract the url of the tracker
|
// extract the url of the tracker
|
||||||
bdecode_node i = torrent_file.dict_find_list("announce-list");
|
bdecode_node announce_node = torrent_file.dict_find_list("announce-list");
|
||||||
if (i)
|
if (announce_node)
|
||||||
{
|
{
|
||||||
m_urls.reserve(i.list_size());
|
m_urls.reserve(announce_node.list_size());
|
||||||
for (int j = 0, end(i.list_size()); j < end; ++j)
|
for (int j = 0, end(announce_node.list_size()); j < end; ++j)
|
||||||
{
|
{
|
||||||
bdecode_node tier = i.list_at(j);
|
bdecode_node tier = announce_node.list_at(j);
|
||||||
if (tier.type() != bdecode_node::list_t) continue;
|
if (tier.type() != bdecode_node::list_t) continue;
|
||||||
for (int k = 0, end(tier.list_size()); k < end; ++k)
|
for (int k = 0, end(tier.list_size()); k < end; ++k)
|
||||||
{
|
{
|
||||||
|
@ -1562,7 +1562,6 @@ namespace libtorrent
|
||||||
std::random_shuffle(start, stop);
|
std::random_shuffle(start, stop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (m_urls.empty())
|
if (m_urls.empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace libtorrent
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case torrent_peer_allocator_interface::ipv4_peer_type:
|
case torrent_peer_allocator_interface::ipv4_peer_type:
|
||||||
p = (torrent_peer*)m_ipv4_peer_pool.malloc();
|
p = static_cast<torrent_peer*>(m_ipv4_peer_pool.malloc());
|
||||||
if (p == NULL) return NULL;
|
if (p == NULL) return NULL;
|
||||||
m_ipv4_peer_pool.set_next_size(500);
|
m_ipv4_peer_pool.set_next_size(500);
|
||||||
m_total_bytes += sizeof(libtorrent::ipv4_peer);
|
m_total_bytes += sizeof(libtorrent::ipv4_peer);
|
||||||
|
@ -69,7 +69,7 @@ namespace libtorrent
|
||||||
break;
|
break;
|
||||||
#if TORRENT_USE_IPV6
|
#if TORRENT_USE_IPV6
|
||||||
case torrent_peer_allocator_interface::ipv6_peer_type:
|
case torrent_peer_allocator_interface::ipv6_peer_type:
|
||||||
p = (torrent_peer*)m_ipv6_peer_pool.malloc();
|
p = static_cast<torrent_peer*>(m_ipv6_peer_pool.malloc());
|
||||||
if (p == NULL) return NULL;
|
if (p == NULL) return NULL;
|
||||||
m_ipv6_peer_pool.set_next_size(500);
|
m_ipv6_peer_pool.set_next_size(500);
|
||||||
m_total_bytes += sizeof(libtorrent::ipv6_peer);
|
m_total_bytes += sizeof(libtorrent::ipv6_peer);
|
||||||
|
@ -80,7 +80,7 @@ namespace libtorrent
|
||||||
#endif
|
#endif
|
||||||
#if TORRENT_USE_I2P
|
#if TORRENT_USE_I2P
|
||||||
case torrent_peer_allocator_interface::i2p_peer_type:
|
case torrent_peer_allocator_interface::i2p_peer_type:
|
||||||
p = (torrent_peer*)m_i2p_peer_pool.malloc();
|
p = static_cast<torrent_peer*>(m_i2p_peer_pool.malloc());
|
||||||
if (p == NULL) return NULL;
|
if (p == NULL) return NULL;
|
||||||
m_i2p_peer_pool.set_next_size(500);
|
m_i2p_peer_pool.set_next_size(500);
|
||||||
m_total_bytes += sizeof(libtorrent::i2p_peer);
|
m_total_bytes += sizeof(libtorrent::i2p_peer);
|
||||||
|
@ -98,7 +98,7 @@ namespace libtorrent
|
||||||
#if TORRENT_USE_IPV6
|
#if TORRENT_USE_IPV6
|
||||||
if (p->is_v6_addr)
|
if (p->is_v6_addr)
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(m_ipv6_peer_pool.is_from((libtorrent::ipv6_peer*)p));
|
TORRENT_ASSERT(m_ipv6_peer_pool.is_from(static_cast<libtorrent::ipv6_peer*>(p)));
|
||||||
static_cast<libtorrent::ipv6_peer*>(p)->~ipv6_peer();
|
static_cast<libtorrent::ipv6_peer*>(p)->~ipv6_peer();
|
||||||
m_ipv6_peer_pool.free(p);
|
m_ipv6_peer_pool.free(p);
|
||||||
TORRENT_ASSERT(m_live_bytes >= sizeof(ipv6_peer));
|
TORRENT_ASSERT(m_live_bytes >= sizeof(ipv6_peer));
|
||||||
|
@ -111,7 +111,7 @@ namespace libtorrent
|
||||||
#if TORRENT_USE_I2P
|
#if TORRENT_USE_I2P
|
||||||
if (p->is_i2p_addr)
|
if (p->is_i2p_addr)
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(m_i2p_peer_pool.is_from((libtorrent::i2p_peer*)p));
|
TORRENT_ASSERT(m_i2p_peer_pool.is_from(static_cast<libtorrent::i2p_peer*>(p)));
|
||||||
static_cast<libtorrent::i2p_peer*>(p)->~i2p_peer();
|
static_cast<libtorrent::i2p_peer*>(p)->~i2p_peer();
|
||||||
m_i2p_peer_pool.free(p);
|
m_i2p_peer_pool.free(p);
|
||||||
TORRENT_ASSERT(m_live_bytes >= sizeof(i2p_peer));
|
TORRENT_ASSERT(m_live_bytes >= sizeof(i2p_peer));
|
||||||
|
@ -121,7 +121,7 @@ namespace libtorrent
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
TORRENT_ASSERT(m_ipv4_peer_pool.is_from((libtorrent::ipv4_peer*)p));
|
TORRENT_ASSERT(m_ipv4_peer_pool.is_from(static_cast<libtorrent::ipv4_peer*>(p)));
|
||||||
static_cast<libtorrent::ipv4_peer*>(p)->~ipv4_peer();
|
static_cast<libtorrent::ipv4_peer*>(p)->~ipv4_peer();
|
||||||
m_ipv4_peer_pool.free(p);
|
m_ipv4_peer_pool.free(p);
|
||||||
TORRENT_ASSERT(m_live_bytes >= sizeof(ipv4_peer));
|
TORRENT_ASSERT(m_live_bytes >= sizeof(ipv4_peer));
|
||||||
|
|
|
@ -94,7 +94,7 @@ udp_socket::udp_socket(io_service& ios)
|
||||||
|
|
||||||
m_buf_size = 2048;
|
m_buf_size = 2048;
|
||||||
m_new_buf_size = m_buf_size;
|
m_new_buf_size = m_buf_size;
|
||||||
m_buf = (char*)malloc(m_buf_size);
|
m_buf = static_cast<char*>(malloc(m_buf_size));
|
||||||
}
|
}
|
||||||
|
|
||||||
udp_socket::~udp_socket()
|
udp_socket::~udp_socket()
|
||||||
|
@ -281,14 +281,14 @@ void udp_socket::on_read(error_code const& ec, udp::socket* s)
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
error_code ec;
|
error_code err;
|
||||||
udp::endpoint ep;
|
udp::endpoint ep;
|
||||||
size_t bytes_transferred = s->receive_from(boost::asio::buffer(m_buf, m_buf_size), ep, 0, ec);
|
size_t bytes_transferred = s->receive_from(boost::asio::buffer(m_buf, m_buf_size), ep, 0, err);
|
||||||
|
|
||||||
// TODO: it would be nice to detect this on posix systems also
|
// TODO: it would be nice to detect this on posix systems also
|
||||||
#ifdef TORRENT_WINDOWS
|
#ifdef TORRENT_WINDOWS
|
||||||
if ((ec == error_code(ERROR_MORE_DATA, system_category())
|
if ((err == error_code(ERROR_MORE_DATA, system_category())
|
||||||
|| ec == error_code(WSAEMSGSIZE, system_category()))
|
|| err == error_code(WSAEMSGSIZE, system_category()))
|
||||||
&& m_buf_size < 65536)
|
&& m_buf_size < 65536)
|
||||||
{
|
{
|
||||||
// if this function fails to allocate memory, m_buf_size
|
// if this function fails to allocate memory, m_buf_size
|
||||||
|
@ -299,8 +299,8 @@ void udp_socket::on_read(error_code const& ec, udp::socket* s)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ec == boost::asio::error::would_block || ec == boost::asio::error::try_again) break;
|
if (err == boost::asio::error::would_block || err == boost::asio::error::try_again) break;
|
||||||
on_read_impl(ep, ec, bytes_transferred);
|
on_read_impl(ep, err, bytes_transferred);
|
||||||
}
|
}
|
||||||
call_drained_handler();
|
call_drained_handler();
|
||||||
setup_read(s);
|
setup_read(s);
|
||||||
|
@ -1279,7 +1279,7 @@ void udp_socket::connect2(error_code const& e)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// in this case we need to read more data from the socket
|
// in this case we need to read more data from the socket
|
||||||
TORRENT_ASSERT(false && "not implemented yet!");
|
TORRENT_ASSERT(false);
|
||||||
drain_queue();
|
drain_queue();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -527,7 +527,7 @@ namespace libtorrent
|
||||||
if (cb)
|
if (cb)
|
||||||
{
|
{
|
||||||
char hex_ih[41];
|
char hex_ih[41];
|
||||||
to_hex((char const*)&tracker_req().info_hash[0], 20, hex_ih);
|
to_hex(tracker_req().info_hash.data(), 20, hex_ih);
|
||||||
cb->debug_log("==> UDP_TRACKER_CONNECT [ to: %s ih: %s]"
|
cb->debug_log("==> UDP_TRACKER_CONNECT [ to: %s ih: %s]"
|
||||||
, m_hostname.empty()
|
, m_hostname.empty()
|
||||||
? print_endpoint(m_target).c_str()
|
? print_endpoint(m_target).c_str()
|
||||||
|
@ -757,7 +757,7 @@ namespace libtorrent
|
||||||
if (cb)
|
if (cb)
|
||||||
{
|
{
|
||||||
char hex_ih[41];
|
char hex_ih[41];
|
||||||
to_hex((char const*)&req.info_hash[0], 20, hex_ih);
|
to_hex(req.info_hash.data(), 20, hex_ih);
|
||||||
cb->debug_log("==> UDP_TRACKER_ANNOUNCE [%s]", hex_ih);
|
cb->debug_log("==> UDP_TRACKER_ANNOUNCE [%s]", hex_ih);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue