merged utp fix from RC_0_16

This commit is contained in:
Arvid Norberg 2012-11-14 04:53:29 +00:00
parent 5b26d5d962
commit e4bb337b49
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fixed bug in uTP packet circle buffer
* fix potential crash when using torrent_handle::add_piece
* added missing add_torrent_alert to python binding

View File

@ -104,7 +104,7 @@ namespace libtorrent {
else if (idx < m_first)
{
// We have wrapped.
if (idx > ((m_first + m_capacity) & 0xffff) && m_capacity < 0xffff)
if (idx >= ((m_first + m_capacity) & 0xffff) && m_capacity < 0xffff)
{
reserve(m_capacity + (idx - ((m_first + m_capacity) & 0xffff)));
}