forked from premiere/premiere-libtorrent
merge change from RC_0_16
This commit is contained in:
parent
8d9fa465d2
commit
0c6654f484
|
@ -97,10 +97,14 @@ namespace libtorrent
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
upload_only_msg = 2,
|
// pex_msg = 1,
|
||||||
holepunch_msg = 3,
|
// metadata_msg = 2,
|
||||||
share_mode_msg = 4,
|
upload_only_msg = 3,
|
||||||
dont_have_msg = 5,
|
holepunch_msg = 4,
|
||||||
|
// recommend_msg = 5,
|
||||||
|
// comment_msg = 6,
|
||||||
|
dont_have_msg = 7,
|
||||||
|
share_mode_msg = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
~bt_peer_connection();
|
~bt_peer_connection();
|
||||||
|
|
|
@ -205,7 +205,7 @@ namespace libtorrent { namespace
|
||||||
virtual void add_handshake(entry& h)
|
virtual void add_handshake(entry& h)
|
||||||
{
|
{
|
||||||
entry& messages = h["m"];
|
entry& messages = h["m"];
|
||||||
messages["ut_metadata"] = 15;
|
messages["ut_metadata"] = 2;
|
||||||
if (m_torrent.valid_metadata())
|
if (m_torrent.valid_metadata())
|
||||||
h["metadata_size"] = m_tp.metadata().left();
|
h["metadata_size"] = m_tp.metadata().left();
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ namespace libtorrent { namespace
|
||||||
virtual bool on_extended(int length
|
virtual bool on_extended(int length
|
||||||
, int extended_msg, buffer::const_interval body)
|
, 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 (m_message_index == 0) return false;
|
||||||
|
|
||||||
if (length > 17 * 1024)
|
if (length > 17 * 1024)
|
||||||
|
|
Loading…
Reference in New Issue