diff options
author | Andrew Resch <andrewresch@gmail.com> | 2009-01-10 21:25:43 +0000 |
---|---|---|
committer | Andrew Resch <andrewresch@gmail.com> | 2009-01-10 21:25:43 +0000 |
commit | 107079fbabef5d2086027b18812ce04eb549ad91 (patch) | |
tree | 60041853263a852f0601a404431b3673b3e2f080 | |
parent | 57c1950d40b566a95064169945e8e0e03e589fed (diff) | |
download | deluge-107079fbabef5d2086027b18812ce04eb549ad91.tar.gz deluge-107079fbabef5d2086027b18812ce04eb549ad91.tar.bz2 deluge-107079fbabef5d2086027b18812ce04eb549ad91.zip |
lt sync 3143
-rw-r--r-- | libtorrent/include/libtorrent/lazy_entry.hpp | 14 | ||||
-rwxr-xr-x | libtorrent/src/session_impl.cpp | 2 | ||||
-rwxr-xr-x | libtorrent/src/torrent_handle.cpp | 3 | ||||
-rw-r--r-- | libtorrent/src/udp_socket.cpp | 1 |
4 files changed, 12 insertions, 8 deletions
diff --git a/libtorrent/include/libtorrent/lazy_entry.hpp b/libtorrent/include/libtorrent/lazy_entry.hpp index 01d1ac3ca..3745535ef 100644 --- a/libtorrent/include/libtorrent/lazy_entry.hpp +++ b/libtorrent/include/libtorrent/lazy_entry.hpp @@ -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); } diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index a4403200b..d1aca0f1e 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -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 diff --git a/libtorrent/src/torrent_handle.cpp b/libtorrent/src/torrent_handle.cpp index e573dc506..9a39e4661 100755 --- a/libtorrent/src/torrent_handle.cpp +++ b/libtorrent/src/torrent_handle.cpp @@ -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 diff --git a/libtorrent/src/udp_socket.cpp b/libtorrent/src/udp_socket.cpp index 6f36e605e..8ea855a54 100644 --- a/libtorrent/src/udp_socket.cpp +++ b/libtorrent/src/udp_socket.cpp @@ -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)); } |