bandwidth management fix + fix to http tracker connection request builder

This commit is contained in:
Arvid Norberg 2007-02-19 21:24:48 +00:00
parent 9c0e9701d9
commit f5fe27e691
2 changed files with 3 additions and 3 deletions

View File

@ -406,7 +406,7 @@ namespace libtorrent
}
if (!url_has_argument(request, "numwant"))
{
m_send_buffer += "&numwant=";
m_send_buffer += "numwant=";
m_send_buffer += boost::lexical_cast<std::string>(
std::min(req.num_want, 999));
m_send_buffer += '&';

View File

@ -1860,8 +1860,8 @@ namespace libtorrent
{
int max_assignable = m_bandwidth_limit[channel].max_assignable();
return max_assignable > max_bandwidth_block_size
|| (m_bandwidth_limit[channel].throttle() < m_bandwidth_limit[channel].max_assignable())
&& max_assignable > 0;
|| (m_bandwidth_limit[channel].throttle() < max_bandwidth_block_size
&& max_assignable > 0);
}
void torrent::request_bandwidth(int channel