lt sync 3143

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

View file

@ -35,20 +35,22 @@ POSSIBILITY OF SUCH DAMAGE.
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "libtorrent/assert.hpp"
#include "libtorrent/size_type.hpp"
#include <iosfwd> #include <iosfwd>
#include <string> #include <string>
#include "libtorrent/config.hpp"
#include "libtorrent/assert.hpp"
#include "libtorrent/size_type.hpp"
namespace libtorrent namespace libtorrent
{ {
struct lazy_entry; 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 // 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 enum entry_type_t
{ {
@ -225,7 +227,7 @@ namespace libtorrent
char const* m_end; 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) if (m_settings.cache_size != s.cache_size)
m_disk_thread.set_cache_size(s.cache_size); m_disk_thread.set_cache_size(s.cache_size);
if (m_settings.cache_expiry != s.cache_expiry) 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 // if queuing settings were changed, recalculate
// queued torrents sooner // queued torrents sooner
if ((m_settings.active_downloads != s.active_downloads if ((m_settings.active_downloads != s.active_downloads

View file

@ -298,7 +298,8 @@ namespace libtorrent
void torrent_handle::queue_position_up() const void torrent_handle::queue_position_up() const
{ {
INVARIANT_CHECK; 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 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.address(i->endpoint().address());
m_proxy_addr.port(i->endpoint().port()); 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) m_cc.enqueue(boost::bind(&udp_socket::on_connect, this, _1)
, boost::bind(&udp_socket::on_timeout, this), seconds(10)); , boost::bind(&udp_socket::on_timeout, this), seconds(10));
} }