fix truncation of peer_class field in torrent

This commit is contained in:
arvidn 2017-01-21 12:08:53 -05:00 committed by Arvid Norberg
parent 6d17f0fb66
commit 3763a47846
1 changed files with 2 additions and 2 deletions

View File

@ -588,7 +588,7 @@ namespace libtorrent
void set_download_limit(int limit);
int download_limit() const;
peer_class_t peer_class() const { return peer_class_t(m_peer_class); }
peer_class_t peer_class() const { return m_peer_class; }
void set_max_uploads(int limit, bool state_update = true);
int max_uploads() const { return m_max_uploads; }
@ -1421,7 +1421,7 @@ namespace libtorrent
// for torrents who have a bandwidth limit, this is != 0
// and refers to a peer_class in the session.
boost::uint16_t m_peer_class;
peer_class_t m_peer_class;
// of all peers in m_connections, this is the number
// of peers that are outgoing and still waiting to