dll export fix + reverting upload slot change
This commit is contained in:
parent
5b604e2a3a
commit
eecc78b931
|
@ -197,9 +197,11 @@ namespace libtorrent
|
||||||
inline asio::error::error_category get_posix_category() { return asio::error::system_category; }
|
inline asio::error::error_category get_posix_category() { return asio::error::system_category; }
|
||||||
inline asio::error::error_category get_system_category() { return asio::error::system_category; }
|
inline asio::error::error_category get_system_category() { return asio::error::system_category; }
|
||||||
|
|
||||||
extern asio::error::error_category libtorrent_category;
|
extern TORRENT_EXPORT asio::error::error_category libtorrent_category;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
class TORRENT_EXPORT boost::system::error_category;
|
||||||
|
|
||||||
struct TORRENT_EXPORT libtorrent_error_category : boost::system::error_category
|
struct TORRENT_EXPORT libtorrent_error_category : boost::system::error_category
|
||||||
{
|
{
|
||||||
virtual const char* name() const;
|
virtual const char* name() const;
|
||||||
|
|
|
@ -398,7 +398,7 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
namespace aux
|
namespace aux
|
||||||
{
|
{
|
||||||
extern ptime g_current_time;
|
extern TORRENT_EXPORT ptime g_current_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ptime const& time_now() { return aux::g_current_time; }
|
inline ptime const& time_now() { return aux::g_current_time; }
|
||||||
|
|
|
@ -32,6 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <boost/version.hpp>
|
#include <boost/version.hpp>
|
||||||
|
|
||||||
|
#include "libtorrent/config.hpp"
|
||||||
#include "libtorrent/error_code.hpp"
|
#include "libtorrent/error_code.hpp"
|
||||||
|
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
|
@ -193,7 +194,7 @@ namespace libtorrent
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
::asio::error::error_category libtorrent_category(20);
|
TORRENT_EXPORT ::asio::error::error_category libtorrent_category(20);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ namespace aux {
|
||||||
// than a system call and can be
|
// than a system call and can be
|
||||||
// used where more accurate time
|
// used where more accurate time
|
||||||
// is not necessary
|
// is not necessary
|
||||||
ptime g_current_time = time_now_hires();
|
TORRENT_EXPORT ptime g_current_time = time_now_hires();
|
||||||
|
|
||||||
struct seed_random_generator
|
struct seed_random_generator
|
||||||
{
|
{
|
||||||
|
@ -1873,8 +1873,6 @@ namespace aux {
|
||||||
peers.push_back(p.get());
|
peers.push_back(p.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the client is configured to use fully automatic
|
|
||||||
// unchoke slots, m_max_uploads is still a lower limit
|
|
||||||
if (m_settings.auto_upload_slots_rate_based
|
if (m_settings.auto_upload_slots_rate_based
|
||||||
&& m_settings.auto_upload_slots)
|
&& m_settings.auto_upload_slots)
|
||||||
{
|
{
|
||||||
|
@ -1907,9 +1905,7 @@ namespace aux {
|
||||||
int rate = p.uploaded_since_unchoke()
|
int rate = p.uploaded_since_unchoke()
|
||||||
* 1000 / total_milliseconds(unchoke_interval);
|
* 1000 / total_milliseconds(unchoke_interval);
|
||||||
|
|
||||||
if (rate < rate_threshold
|
if (rate < rate_threshold) break;
|
||||||
&& m_allowed_upload_slots >= m_max_uploads)
|
|
||||||
break;
|
|
||||||
|
|
||||||
++m_allowed_upload_slots;
|
++m_allowed_upload_slots;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue