merged RC_1_1 into master
This commit is contained in:
commit
f4d7ff592e
|
@ -84,12 +84,14 @@
|
||||||
* resume data no longer has timestamps of files
|
* resume data no longer has timestamps of files
|
||||||
* require C++11 to build libtorrent
|
* require C++11 to build libtorrent
|
||||||
|
|
||||||
|
* fix recent regression with force_proxy setting
|
||||||
* don't perform DNS lookups for the DHT bootstrap unless DHT is enabled
|
* don't perform DNS lookups for the DHT bootstrap unless DHT is enabled
|
||||||
* fix issue where setting file/piece priority would stop checking
|
* fix issue where setting file/piece priority would stop checking
|
||||||
* expose post_dht_stats() to python binding
|
* expose post_dht_stats() to python binding
|
||||||
* fix backwards compatibility to downloads without partfiles
|
* fix backwards compatibility to downloads without partfiles
|
||||||
* improve part-file related error messages
|
* improve part-file related error messages
|
||||||
* fix reporting &redundant= in tracker announces
|
* fix reporting &redundant= in tracker announces
|
||||||
|
* fix tracker announces reporting more data downloaded than the size of the torrent
|
||||||
* fix tie-break in duplicate peer connection disconnect logic
|
* fix tie-break in duplicate peer connection disconnect logic
|
||||||
* fix issue with SSL tracker connections left in CLOSE_WAIT state
|
* fix issue with SSL tracker connections left in CLOSE_WAIT state
|
||||||
* defer truncating existing files until the first time we write to them
|
* defer truncating existing files until the first time we write to them
|
||||||
|
|
|
@ -2745,10 +2745,34 @@ bool is_downloading_state(int const st)
|
||||||
req.ssl_ctx = m_ssl_ctx.get();
|
req.ssl_ctx = m_ssl_ctx.get();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
req.redundant = m_total_redundant_bytes;
|
||||||
// exclude redundant bytes if we should
|
// exclude redundant bytes if we should
|
||||||
if (!settings().get_bool(settings_pack::report_true_downloaded))
|
if (!settings().get_bool(settings_pack::report_true_downloaded))
|
||||||
|
{
|
||||||
req.downloaded -= m_total_redundant_bytes;
|
req.downloaded -= m_total_redundant_bytes;
|
||||||
req.redundant = m_total_redundant_bytes;
|
|
||||||
|
// if the torrent is complete we know that all incoming pieces will be
|
||||||
|
// marked redundant so add them to the redundant count
|
||||||
|
// this is mainly needed to cover the case where a torrent has just completed
|
||||||
|
// but still has partially downloaded pieces
|
||||||
|
// if the incoming pieces are not accounted for it could cause the downloaded
|
||||||
|
// amount to exceed the total size of the torrent which upsets some trackers
|
||||||
|
if (is_seed())
|
||||||
|
{
|
||||||
|
for (peer_iterator i = m_connections.begin();
|
||||||
|
i != m_connections.end(); ++i)
|
||||||
|
{
|
||||||
|
TORRENT_INCREMENT(m_iterating_connections);
|
||||||
|
peer_connection* p = *i;
|
||||||
|
boost::optional<piece_block_progress> pbp = p->downloading_piece_progress();
|
||||||
|
if (pbp && pbp->bytes_downloaded > 0)
|
||||||
|
{
|
||||||
|
req.downloaded -= pbp->bytes_downloaded;
|
||||||
|
req.redundant += pbp->bytes_downloaded;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (req.downloaded < 0) req.downloaded = 0;
|
if (req.downloaded < 0) req.downloaded = 0;
|
||||||
|
|
||||||
req.event = e;
|
req.event = e;
|
||||||
|
|
Loading…
Reference in New Issue