back-port deletion of the redundant peer_connection constructor from libtorrent_aio

This commit is contained in:
Arvid Norberg
2012-05-14 05:43:45 +00:00
parent cc7ff1606c
commit 5275e75fa5
5 changed files with 5 additions and 221 deletions

View File

@@ -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