merged fixes from RC_1_0
This commit is contained in:
@@ -400,7 +400,7 @@ std::string const& piece_bar(libtorrent::bitfield const& p, int width)
|
|||||||
int end = (std::max)(int(piece + piece_per_char), int(piece) + 1);
|
int end = (std::max)(int(piece + piece_per_char), int(piece) + 1);
|
||||||
for (int k = int(piece); k < end; ++k, ++num_pieces)
|
for (int k = int(piece); k < end; ++k, ++num_pieces)
|
||||||
if (p[k]) ++num_have;
|
if (p[k]) ++num_have;
|
||||||
int color = int(std::ceil(num_have / float(num_pieces) * (table_size - 1)));
|
int color = int(std::ceil(num_have / float((std::max)(num_pieces, 1)) * (table_size - 1)));
|
||||||
char buf[10];
|
char buf[10];
|
||||||
snprintf(buf, 10, "48;5;%d", 232 + color);
|
snprintf(buf, 10, "48;5;%d", 232 + color);
|
||||||
bar += esc(buf);
|
bar += esc(buf);
|
||||||
|
@@ -1847,7 +1847,7 @@ namespace libtorrent
|
|||||||
{
|
{
|
||||||
max_out_request_queue(reqq);
|
max_out_request_queue(reqq);
|
||||||
#ifdef TORRENT_VERBOSE_LOGGING
|
#ifdef TORRENT_VERBOSE_LOGGING
|
||||||
peer_log("*** MAX OUT REQUEST QUEUE [ %d ]", req);
|
peer_log("*** MAX OUT REQUEST QUEUE [ %d ]", reqq);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1099,7 +1099,7 @@ namespace libtorrent
|
|||||||
std::cerr << "[" << this << "] " << "restore_piece(" << index << ")" << std::endl;
|
std::cerr << "[" << this << "] " << "restore_piece(" << index << ")" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
TORRENT_ASSERT(index >= 0);
|
TORRENT_ASSERT(index >= 0);
|
||||||
TORRENT_ASSERT(index < (int)m_piece_map.size());
|
TORRENT_ASSERT(index < int(m_piece_map.size()));
|
||||||
|
|
||||||
int download_state = m_piece_map[index].download_queue();
|
int download_state = m_piece_map[index].download_queue();
|
||||||
TORRENT_ASSERT(download_state != piece_pos::piece_open);
|
TORRENT_ASSERT(download_state != piece_pos::piece_open);
|
||||||
|
@@ -2390,7 +2390,7 @@ retry:
|
|||||||
if (ec)
|
if (ec)
|
||||||
{
|
{
|
||||||
#ifndef TORRENT_DISABLE_LOGGING
|
#ifndef TORRENT_DISABLE_LOGGING
|
||||||
session_log("%s <== INCOMING CONNECTION FAILED, could "
|
session_log(" <== INCOMING CONNECTION FAILED, could "
|
||||||
"not retrieve remote endpoint: %s"
|
"not retrieve remote endpoint: %s"
|
||||||
, print_endpoint(endp).c_str(), ec.message().c_str());
|
, print_endpoint(endp).c_str(), ec.message().c_str());
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user