merged fixes from RC_1_0
This commit is contained in:
parent
0d72163a56
commit
ab0c97755e
|
@ -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);
|
||||
for (int k = int(piece); k < end; ++k, ++num_pieces)
|
||||
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];
|
||||
snprintf(buf, 10, "48;5;%d", 232 + color);
|
||||
bar += esc(buf);
|
||||
|
|
|
@ -1847,7 +1847,7 @@ namespace libtorrent
|
|||
{
|
||||
max_out_request_queue(reqq);
|
||||
#ifdef TORRENT_VERBOSE_LOGGING
|
||||
peer_log("*** MAX OUT REQUEST QUEUE [ %d ]", req);
|
||||
peer_log("*** MAX OUT REQUEST QUEUE [ %d ]", reqq);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1099,7 +1099,7 @@ namespace libtorrent
|
|||
std::cerr << "[" << this << "] " << "restore_piece(" << index << ")" << std::endl;
|
||||
#endif
|
||||
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();
|
||||
TORRENT_ASSERT(download_state != piece_pos::piece_open);
|
||||
|
|
|
@ -2390,7 +2390,7 @@ retry:
|
|||
if (ec)
|
||||
{
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
session_log("%s <== INCOMING CONNECTION FAILED, could "
|
||||
session_log(" <== INCOMING CONNECTION FAILED, could "
|
||||
"not retrieve remote endpoint: %s"
|
||||
, print_endpoint(endp).c_str(), ec.message().c_str());
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue