fixed bugs in dont-have and upload-only extension messages

This commit is contained in:
Arvid Norberg 2011-10-11 07:20:12 +00:00
parent 744a3be65d
commit e1bfd8541f
2 changed files with 8 additions and 3 deletions

View File

@ -93,6 +93,11 @@
incoming connection
* added more detailed instrumentation of the disk I/O thread
* fixed bugs in dont-have and upload-only extension messages
* don't open files in random-access mode (speeds up hashing)
0.15.8 release
* allow NULL to be passed to create_torrent::set_comment and create_torrent::set_creator
* fix UPnP issue for routers with multiple PPPoE connections
* fix issue where event=stopped announces wouldn't be sent when closing session

View File

@ -1645,7 +1645,7 @@ namespace libtorrent
if (extended_id == upload_only_msg)
{
if (!packet_finished()) return;
if (packet_size() != 1)
if (packet_size() != 3)
{
#ifdef TORRENT_VERBOSE_LOGGING
peer_log("<== UPLOAD_ONLY [ ERROR: unexpected packet size: %d ]", packet_size());
@ -1663,7 +1663,7 @@ namespace libtorrent
if (extended_id == share_mode_msg)
{
if (!packet_finished()) return;
if (packet_size() != 1)
if (packet_size() != 3)
{
#ifdef TORRENT_VERBOSE_LOGGING
peer_log("<== SHARE_MODE [ ERROR: unexpected packet size: %d ]", packet_size());
@ -1691,7 +1691,7 @@ namespace libtorrent
if (extended_id == dont_have_msg)
{
if (!packet_finished()) return;
if (packet_size() != 4)
if (packet_size() != 6)
{
#ifdef TORRENT_VERBOSE_LOGGING
peer_log("<== DONT_HAVE [ ERROR: unexpected packet size: %d ]", packet_size());