forked from premiere/premiere-libtorrent
fix %u -> %d format codes
This commit is contained in:
parent
fa376ca3af
commit
35ad3bb499
|
@ -383,7 +383,7 @@ namespace libtorrent {
|
|||
std::string scrape_reply_alert::message() const
|
||||
{
|
||||
char ret[400];
|
||||
std::snprintf(ret, sizeof(ret), "%s scrape reply: %u %u"
|
||||
std::snprintf(ret, sizeof(ret), "%s scrape reply: %d %d"
|
||||
, tracker_alert::message().c_str(), incomplete, complete);
|
||||
return ret;
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ namespace libtorrent {
|
|||
std::string tracker_reply_alert::message() const
|
||||
{
|
||||
char ret[400];
|
||||
std::snprintf(ret, sizeof(ret), "%s received peers: %u"
|
||||
std::snprintf(ret, sizeof(ret), "%s received peers: %d"
|
||||
, tracker_alert::message().c_str(), num_peers);
|
||||
return ret;
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ namespace libtorrent {
|
|||
std::string dht_reply_alert::message() const
|
||||
{
|
||||
char ret[400];
|
||||
std::snprintf(ret, sizeof(ret), "%s received DHT peers: %u"
|
||||
std::snprintf(ret, sizeof(ret), "%s received DHT peers: %d"
|
||||
, tracker_alert::message().c_str(), num_peers);
|
||||
return ret;
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ namespace libtorrent {
|
|||
{
|
||||
char ret[200];
|
||||
std::snprintf(ret, sizeof(ret), "%s peer sent an invalid piece request "
|
||||
"(piece: %d start: %u len: %u)%s"
|
||||
"(piece: %d start: %d len: %d)%s"
|
||||
, peer_alert::message().c_str()
|
||||
, static_cast<int>(request.piece)
|
||||
, request.start
|
||||
|
@ -587,7 +587,7 @@ namespace libtorrent {
|
|||
std::string request_dropped_alert::message() const
|
||||
{
|
||||
char ret[200];
|
||||
std::snprintf(ret, sizeof(ret), "%s peer dropped block ( piece: %d block: %u)"
|
||||
std::snprintf(ret, sizeof(ret), "%s peer dropped block ( piece: %d block: %d)"
|
||||
, torrent_alert::message().c_str(), static_cast<int>(piece_index), block_index);
|
||||
return ret;
|
||||
}
|
||||
|
@ -605,7 +605,7 @@ namespace libtorrent {
|
|||
std::string block_timeout_alert::message() const
|
||||
{
|
||||
char ret[200];
|
||||
std::snprintf(ret, sizeof(ret), "%s peer timed out request ( piece: %d block: %u)"
|
||||
std::snprintf(ret, sizeof(ret), "%s peer timed out request ( piece: %d block: %d)"
|
||||
, torrent_alert::message().c_str(), static_cast<int>(piece_index), block_index);
|
||||
return ret;
|
||||
}
|
||||
|
@ -623,7 +623,7 @@ namespace libtorrent {
|
|||
std::string block_finished_alert::message() const
|
||||
{
|
||||
char ret[200];
|
||||
std::snprintf(ret, sizeof(ret), "%s block finished downloading (piece: %d block: %u)"
|
||||
std::snprintf(ret, sizeof(ret), "%s block finished downloading (piece: %d block: %d)"
|
||||
, torrent_alert::message().c_str(), static_cast<int>(piece_index), block_index);
|
||||
return ret;
|
||||
}
|
||||
|
@ -644,7 +644,7 @@ namespace libtorrent {
|
|||
std::string block_downloading_alert::message() const
|
||||
{
|
||||
char ret[200];
|
||||
std::snprintf(ret, sizeof(ret), "%s requested block (piece: %d block: %u)"
|
||||
std::snprintf(ret, sizeof(ret), "%s requested block (piece: %d block: %d)"
|
||||
, torrent_alert::message().c_str(), static_cast<int>(piece_index), block_index);
|
||||
return ret;
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ namespace libtorrent {
|
|||
std::string unwanted_block_alert::message() const
|
||||
{
|
||||
char ret[200];
|
||||
std::snprintf(ret, sizeof(ret), "%s received block not in download queue (piece: %d block: %u)"
|
||||
std::snprintf(ret, sizeof(ret), "%s received block not in download queue (piece: %d block: %d)"
|
||||
, torrent_alert::message().c_str(), static_cast<int>(piece_index), block_index);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1119,7 +1119,7 @@ namespace {
|
|||
std::string portmap_alert::message() const
|
||||
{
|
||||
char ret[200];
|
||||
std::snprintf(ret, sizeof(ret), "successfully mapped port using %s. external port: %s/%u"
|
||||
std::snprintf(ret, sizeof(ret), "successfully mapped port using %s. external port: %s/%d"
|
||||
, nat_type_str[static_cast<int>(map_transport)]
|
||||
, protocol_str[static_cast<int>(map_protocol)], external_port);
|
||||
return ret;
|
||||
|
@ -1217,7 +1217,7 @@ namespace {
|
|||
{
|
||||
error_code ec;
|
||||
char msg[200];
|
||||
std::snprintf(msg, sizeof(msg), "incoming dht announce: %s:%u (%s)"
|
||||
std::snprintf(msg, sizeof(msg), "incoming dht announce: %s:%d (%s)"
|
||||
, ip.to_string(ec).c_str(), port, aux::to_hex(info_hash).c_str());
|
||||
return msg;
|
||||
}
|
||||
|
@ -2520,7 +2520,7 @@ namespace {
|
|||
std::string block_uploaded_alert::message() const
|
||||
{
|
||||
char ret[200];
|
||||
snprintf(ret, sizeof(ret), "%s block uploaded to a peer (piece: %d block: %u)"
|
||||
snprintf(ret, sizeof(ret), "%s block uploaded to a peer (piece: %d block: %d)"
|
||||
, torrent_alert::message().c_str(), static_cast<int>(piece_index), block_index);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -705,7 +705,7 @@ void upnp::post(upnp::rootdevice const& d, char const* soap
|
|||
|
||||
char header[2048];
|
||||
std::snprintf(header, sizeof(header), "POST %s HTTP/1.1\r\n"
|
||||
"Host: %s:%u\r\n"
|
||||
"Host: %s:%d\r\n"
|
||||
"Content-Type: text/xml; charset=\"utf-8\"\r\n"
|
||||
"Content-Length: %d\r\n"
|
||||
"Soapaction: \"%s#%s\"\r\n\r\n"
|
||||
|
@ -754,7 +754,7 @@ void upnp::create_port_mapping(http_connection& c, rootdevice& d
|
|||
"<NewInternalClient>%s</NewInternalClient>"
|
||||
"<NewEnabled>1</NewEnabled>"
|
||||
"<NewPortMappingDescription>%s</NewPortMappingDescription>"
|
||||
"<NewLeaseDuration>%u</NewLeaseDuration>"
|
||||
"<NewLeaseDuration>%d</NewLeaseDuration>"
|
||||
"</u:%s></s:Body></s:Envelope>"
|
||||
, soap_action, d.service_namespace.c_str(), d.mapping[i].external_port
|
||||
, to_string(d.mapping[i].protocol)
|
||||
|
|
|
@ -1762,7 +1762,7 @@ bool utp_socket_impl::send_pkt(int const flags)
|
|||
m_cwnd_full = true;
|
||||
|
||||
UTP_LOGV("%8p: no space in window send_buffer_size:%d cwnd:%d "
|
||||
"adv_wnd:%d in-flight:%d mtu:%d\n"
|
||||
"adv_wnd:%u in-flight:%d mtu:%u\n"
|
||||
, static_cast<void*>(this), m_write_buffer_size, int(m_cwnd >> 16)
|
||||
, m_adv_wnd, m_bytes_in_flight, m_mtu);
|
||||
|
||||
|
@ -1771,7 +1771,7 @@ bool utp_socket_impl::send_pkt(int const flags)
|
|||
#if TORRENT_UTP_LOG
|
||||
UTP_LOGV("%8p: skipping send seq_nr:%d ack_nr:%d "
|
||||
"id:%d target:%s header_size:%d error:%s send_buffer_size:%d cwnd:%d "
|
||||
"adv_wnd:%d in-flight:%d mtu:%d effective-mtu:%d\n"
|
||||
"adv_wnd:%d in-flight:%d mtu:%u effective-mtu:%d\n"
|
||||
, static_cast<void*>(this), int(m_seq_nr), int(m_ack_nr)
|
||||
, m_send_id, print_endpoint(udp::endpoint(m_remote_address, m_port)).c_str()
|
||||
, header_size, m_error.message().c_str(), m_write_buffer_size, int(m_cwnd >> 16)
|
||||
|
@ -1788,7 +1788,7 @@ bool utp_socket_impl::send_pkt(int const flags)
|
|||
#if TORRENT_UTP_LOG
|
||||
UTP_LOGV("%8p: skipping send (no payload and no force) seq_nr:%d ack_nr:%d "
|
||||
"id:%d target:%s header_size:%d error:%s send_buffer_size:%d cwnd:%d "
|
||||
"adv_wnd:%d in-flight:%d mtu:%d\n"
|
||||
"adv_wnd:%u in-flight:%d mtu:%u\n"
|
||||
, static_cast<void*>(this), int(m_seq_nr), int(m_ack_nr)
|
||||
, m_send_id, print_endpoint(udp::endpoint(m_remote_address, m_port)).c_str()
|
||||
, header_size, m_error.message().c_str(), m_write_buffer_size, int(m_cwnd >> 16)
|
||||
|
@ -1916,7 +1916,7 @@ bool utp_socket_impl::send_pkt(int const flags)
|
|||
// outstanding packet is acked, we'll send this
|
||||
// payload
|
||||
UTP_LOGV("%8p: NAGLE not enough payload send_buffer_size:%d cwnd:%d "
|
||||
"adv_wnd:%d in-flight:%d mtu:%d effective_mtu:%d\n"
|
||||
"adv_wnd:%u in-flight:%d mtu:%d effective_mtu:%d\n"
|
||||
, static_cast<void*>(this), m_write_buffer_size, int(m_cwnd >> 16)
|
||||
, m_adv_wnd, m_bytes_in_flight, m_mtu, effective_mtu);
|
||||
TORRENT_ASSERT(!m_nagle_packet);
|
||||
|
@ -1956,7 +1956,7 @@ bool utp_socket_impl::send_pkt(int const flags)
|
|||
#if TORRENT_UTP_LOG
|
||||
UTP_LOG("%8p: sending packet seq_nr:%d ack_nr:%d type:%s "
|
||||
"id:%d target:%s size:%d error:%s send_buffer_size:%d cwnd:%d "
|
||||
"adv_wnd:%d in-flight:%d mtu:%d timestamp:%u time_diff:%u "
|
||||
"adv_wnd:%d in-flight:%d mtu:%d timestamp:%u time_diff:%d "
|
||||
"mtu_probe:%d extension:%d\n"
|
||||
, static_cast<void*>(this), int(h->seq_nr), int(h->ack_nr), packet_type_names[h->get_type()]
|
||||
, m_send_id, print_endpoint(udp::endpoint(m_remote_address, m_port)).c_str()
|
||||
|
@ -2177,7 +2177,7 @@ bool utp_socket_impl::resend_packet(packet* p, bool fast_resend)
|
|||
#if TORRENT_UTP_LOG
|
||||
UTP_LOGV("%8p: re-sending packet seq_nr:%d ack_nr:%d type:%s "
|
||||
"id:%d target:%s size:%d error:%s send_buffer_size:%d cwnd:%d "
|
||||
"adv_wnd:%d in-flight:%d mtu:%d timestamp:%u time_diff:%u\n"
|
||||
"adv_wnd:%d in-flight:%d mtu:%d timestamp:%u time_diff:%d\n"
|
||||
, static_cast<void*>(this), int(h->seq_nr), int(h->ack_nr), packet_type_names[h->get_type()]
|
||||
, m_send_id, print_endpoint(udp::endpoint(m_remote_address, m_port)).c_str()
|
||||
, p->size, ec.message().c_str(), m_write_buffer_size, int(m_cwnd >> 16)
|
||||
|
@ -3434,7 +3434,7 @@ void utp_socket_impl::do_ledbat(const int acked_bytes, const int delay
|
|||
if ((m_cwnd >> 16) >= m_adv_wnd)
|
||||
{
|
||||
m_slow_start = false;
|
||||
UTP_LOGV("%8p: cwnd > advertized wnd (%d) slow_start -> 0\n"
|
||||
UTP_LOGV("%8p: cwnd > advertized wnd (%u) slow_start -> 0\n"
|
||||
, static_cast<void*>(this), m_adv_wnd);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue