merged fix from RC_0_16

This commit is contained in:
Arvid Norberg 2012-08-29 01:58:06 +00:00
parent f877c8b7f5
commit 33233963eb
2 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fixed bug where setting upload slots to -1 would not mean infinite
* extend the UDP tracker protocol to include the request string from the tracker URL
* fix mingw build for linux crosscompiler

View File

@ -2071,6 +2071,8 @@ namespace aux {
else if (s.choking_algorithm == session_settings::auto_expand_choker
&& m_allowed_upload_slots < m_settings.unchoke_slots_limit)
m_allowed_upload_slots = m_settings.unchoke_slots_limit;
if (m_allowed_upload_slots < 0)
m_allowed_upload_slots = (std::numeric_limits<int>::max)();
// replace all occurances of '\n' with ' '.
std::string::iterator i = m_settings.user_agent.begin();
@ -6062,6 +6064,10 @@ namespace aux {
{
TORRENT_ASSERT(is_network_thread());
if (m_settings.unchoke_slots_limit < 0
&& m_settings.choking_algorithm == session_settings::fixed_slots_choker)
TORRENT_ASSERT(m_allowed_upload_slots == (std::numeric_limits<int>::max)());
int num_checking = 0;
int num_queued_for_checking = 0;
for (check_queue_t::const_iterator i = m_queued_for_checking.begin()