lt sync 3143

This commit is contained in:
Andrew Resch
2009-01-10 21:25:43 +00:00
parent 1cd3998350
commit ea3b79bdd5
4 changed files with 12 additions and 8 deletions

View File

@ -35,20 +35,22 @@ POSSIBILITY OF SUCH DAMAGE.
#include <utility>
#include <vector>
#include "libtorrent/assert.hpp"
#include "libtorrent/size_type.hpp"
#include <iosfwd>
#include <string>
#include "libtorrent/config.hpp"
#include "libtorrent/assert.hpp"
#include "libtorrent/size_type.hpp"
namespace libtorrent
{
struct lazy_entry;
char const* parse_int(char const* start, char const* end, char delimiter, boost::int64_t& val);
TORRENT_EXPORT char const* parse_int(char const* start, char const* end
, char delimiter, boost::int64_t& val);
// return 0 = success
int lazy_bdecode(char const* start, char const* end, lazy_entry& ret, int depth_limit = 1000);
TORRENT_EXPORT int lazy_bdecode(char const* start, char const* end, lazy_entry& ret, int depth_limit = 1000);
struct lazy_entry
struct TORRENT_EXPORT lazy_entry
{
enum entry_type_t
{
@ -225,7 +227,7 @@ namespace libtorrent
char const* m_end;
};
std::ostream& operator<<(std::ostream& os, lazy_entry const& e);
TORRENT_EXPORT std::ostream& operator<<(std::ostream& os, lazy_entry const& e);
}

View File

@ -560,7 +560,7 @@ namespace aux {
if (m_settings.cache_size != s.cache_size)
m_disk_thread.set_cache_size(s.cache_size);
if (m_settings.cache_expiry != s.cache_expiry)
m_disk_thread.set_cache_size(s.cache_expiry);
m_disk_thread.set_cache_expiry(s.cache_expiry);
// if queuing settings were changed, recalculate
// queued torrents sooner
if ((m_settings.active_downloads != s.active_downloads

View File

@ -298,7 +298,8 @@ namespace libtorrent
void torrent_handle::queue_position_up() const
{
INVARIANT_CHECK;
TORRENT_FORWARD(set_queue_position(t->queue_position() - 1));
TORRENT_FORWARD(set_queue_position(t->queue_position() == 0
? t->queue_position() : t->queue_position() - 1));
}
void torrent_handle::queue_position_down() const

View File

@ -378,6 +378,7 @@ void udp_socket::on_name_lookup(error_code const& e, tcp::resolver::iterator i)
m_proxy_addr.address(i->endpoint().address());
m_proxy_addr.port(i->endpoint().port());
l.unlock(); // on_connect may be called from within this thread
m_cc.enqueue(boost::bind(&udp_socket::on_connect, this, _1)
, boost::bind(&udp_socket::on_timeout, this), seconds(10));
}