back-port deletion of the redundant peer_connection constructor from libtorrent_aio
This commit is contained in:
@@ -96,10 +96,10 @@ namespace libtorrent
|
||||
|
||||
bt_peer_connection::bt_peer_connection(
|
||||
session_impl& ses
|
||||
, boost::weak_ptr<torrent> tor
|
||||
, shared_ptr<socket_type> s
|
||||
, tcp::endpoint const& remote
|
||||
, policy::peer* peerinfo
|
||||
, boost::weak_ptr<torrent> tor
|
||||
, bool outgoing)
|
||||
: peer_connection(ses, tor, s, remote
|
||||
, peerinfo, outgoing)
|
||||
@@ -128,57 +128,6 @@ namespace libtorrent
|
||||
peer_log("*** bt_peer_connection");
|
||||
#endif
|
||||
|
||||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||
m_in_constructor = false;
|
||||
#endif
|
||||
memset(m_reserved_bits, 0, sizeof(m_reserved_bits));
|
||||
}
|
||||
|
||||
bt_peer_connection::bt_peer_connection(
|
||||
session_impl& ses
|
||||
, boost::shared_ptr<socket_type> s
|
||||
, tcp::endpoint const& remote
|
||||
, policy::peer* peerinfo)
|
||||
: peer_connection(ses, s, remote, peerinfo)
|
||||
, m_state(read_protocol_identifier)
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
, m_upload_only_id(0)
|
||||
, m_holepunch_id(0)
|
||||
, m_dont_have_id(0)
|
||||
, m_share_mode_id(0)
|
||||
, m_supports_extensions(false)
|
||||
#endif
|
||||
, m_supports_dht_port(false)
|
||||
, m_supports_fast(false)
|
||||
#ifndef TORRENT_DISABLE_ENCRYPTION
|
||||
, m_encrypted(false)
|
||||
, m_rc4_encrypted(false)
|
||||
, m_sync_bytes_read(0)
|
||||
#endif
|
||||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||
, m_sent_bitfield(false)
|
||||
, m_in_constructor(true)
|
||||
, m_sent_handshake(false)
|
||||
#endif
|
||||
{
|
||||
|
||||
// we are not attached to any torrent yet.
|
||||
// we have to wait for the handshake to see
|
||||
// which torrent the connector want's to connect to
|
||||
|
||||
|
||||
// upload bandwidth will only be given to connections
|
||||
// that are part of a torrent. Since this is an incoming
|
||||
// connection, we have to give it some initial bandwidth
|
||||
// to send the handshake.
|
||||
#ifndef TORRENT_DISABLE_ENCRYPTION
|
||||
m_quota[download_channel] = 2048;
|
||||
m_quota[upload_channel] = 2048;
|
||||
#else
|
||||
m_quota[download_channel] = 80;
|
||||
m_quota[upload_channel] = 80;
|
||||
#endif
|
||||
|
||||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||
m_in_constructor = false;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user