From f89ce2669f71b360b2a9012e6bb3b77cfaf2e29d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 23 Jul 2007 04:36:56 +0000 Subject: [PATCH] fixes #90. adds compact_mode to torrent_status --- include/libtorrent/torrent_handle.hpp | 5 +++++ src/torrent.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index 81434f722..a4c8af923 100755 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -105,6 +105,7 @@ namespace libtorrent , num_connections(0) , uploads_limit(0) , connections_limit(0) + , compact_mode(false) {} enum state_t @@ -211,6 +212,10 @@ namespace libtorrent int num_connections; int uploads_limit; int connections_limit; + + // true if the torrent is saved in compact mode + // false if it is saved in full allocation mode + bool compact_mode; }; struct TORRENT_EXPORT block_info diff --git a/src/torrent.cpp b/src/torrent.cpp index 6a9a80c58..39f29172f 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -2713,6 +2713,8 @@ namespace libtorrent !boost::bind(&peer_connection::is_connecting , boost::bind(&std::map::value_type::second, _1))); + st.compact_mode = m_compact_mode; + st.num_complete = m_complete; st.num_incomplete = m_incomplete; st.paused = m_paused;