merge change from RC_0_16

This commit is contained in:
Arvid Norberg 2013-02-23 06:40:27 +00:00
parent 8d9fa465d2
commit 0c6654f484
2 changed files with 10 additions and 6 deletions

View File

@ -97,10 +97,14 @@ namespace libtorrent
enum
{
upload_only_msg = 2,
holepunch_msg = 3,
share_mode_msg = 4,
dont_have_msg = 5,
// pex_msg = 1,
// metadata_msg = 2,
upload_only_msg = 3,
holepunch_msg = 4,
// recommend_msg = 5,
// comment_msg = 6,
dont_have_msg = 7,
share_mode_msg = 8,
};
~bt_peer_connection();

View File

@ -205,7 +205,7 @@ namespace libtorrent { namespace
virtual void add_handshake(entry& h)
{
entry& messages = h["m"];
messages["ut_metadata"] = 15;
messages["ut_metadata"] = 2;
if (m_torrent.valid_metadata())
h["metadata_size"] = m_tp.metadata().left();
}
@ -293,7 +293,7 @@ namespace libtorrent { namespace
virtual bool on_extended(int length
, int extended_msg, buffer::const_interval body)
{
if (extended_msg != 15) return false;
if (extended_msg != 2) return false;
if (m_message_index == 0) return false;
if (length > 17 * 1024)