From 0c6654f48460237fb3733ae3d57a127b1d279537 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 23 Feb 2013 06:40:27 +0000 Subject: [PATCH] merge change from RC_0_16 --- include/libtorrent/bt_peer_connection.hpp | 12 ++++++++---- src/ut_metadata.cpp | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/libtorrent/bt_peer_connection.hpp b/include/libtorrent/bt_peer_connection.hpp index bb5dd6fdb..50f788559 100644 --- a/include/libtorrent/bt_peer_connection.hpp +++ b/include/libtorrent/bt_peer_connection.hpp @@ -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(); diff --git a/src/ut_metadata.cpp b/src/ut_metadata.cpp index f1abc3459..daa43919f 100644 --- a/src/ut_metadata.cpp +++ b/src/ut_metadata.cpp @@ -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)