alloca.hpp   alloca.hpp 
skipping to change at line 44 skipping to change at line 44
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#ifdef TORRENT_WINDOWS #ifdef TORRENT_WINDOWS
#include <malloc.h> #include <malloc.h>
#define TORRENT_ALLOCA(t, n) static_cast<t*>(_alloca(sizeof(t) * (n))) #define TORRENT_ALLOCA(t, n) static_cast<t*>(_alloca(sizeof(t) * (n)))
#else #else
#include <stdlib.h> #include <alloca.h>
#define TORRENT_ALLOCA(t, n) static_cast<t*>(alloca(sizeof(t) * (n))) #define TORRENT_ALLOCA(t, n) static_cast<t*>(alloca(sizeof(t) * (n)))
#endif #endif
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 bandwidth_manager.hpp   bandwidth_manager.hpp 
skipping to change at line 93 skipping to change at line 93
, end(m_queue.end()); i != end; ++i) , end(m_queue.end()); i != end; ++i)
{ {
if (i->peer.get() == peer) return true; if (i->peer.get() == peer) return true;
} }
return false; return false;
} }
#endif #endif
int queue_size() const int queue_size() const
{ {
return m_queue.size(); return int(m_queue.size());
} }
int queued_bytes() const int queued_bytes() const
{ {
return m_queued_bytes; return m_queued_bytes;
} }
// non prioritized means that, if there's a line for bandwidth, // non prioritized means that, if there's a line for bandwidth,
// others will cut in front of the non-prioritized peers. // others will cut in front of the non-prioritized peers.
// this is used by web seeds // this is used by web seeds
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 bencode.hpp   bencode.hpp 
skipping to change at line 94 skipping to change at line 94
}; };
namespace detail namespace detail
{ {
template <class OutIt> template <class OutIt>
int write_string(OutIt& out, const std::string& val) int write_string(OutIt& out, const std::string& val)
{ {
for (std::string::const_iterator i = val.begin() for (std::string::const_iterator i = val.begin()
, end(val.end()); i != end; ++i) , end(val.end()); i != end; ++i)
*out++ = *i; *out++ = *i;
return val.length(); return int(val.length());
} }
TORRENT_EXPORT char const* integer_to_str(char* buf, int siz e, entry::integer_type val); TORRENT_EXPORT char const* integer_to_str(char* buf, int siz e, entry::integer_type val);
template <class OutIt> template <class OutIt>
int write_integer(OutIt& out, entry::integer_type val) int write_integer(OutIt& out, entry::integer_type val)
{ {
// the stack allocated buffer for keeping the // the stack allocated buffer for keeping the
// decimal representation of the number can // decimal representation of the number can
// not hold number bigger than this: // not hold number bigger than this:
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 bitfield.hpp   bitfield.hpp 
skipping to change at line 46 skipping to change at line 46
#include "libtorrent/assert.hpp" #include "libtorrent/assert.hpp"
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#include <cstring> // for memset and memcpy #include <cstring> // for memset and memcpy
#include <cstdlib> // for malloc, free and realloc #include <cstdlib> // for malloc, free and realloc
namespace libtorrent namespace libtorrent
{ {
struct TORRENT_EXPORT bitfield struct TORRENT_EXPORT bitfield
{ {
bitfield(): m_bytes(0), m_size(0), m_own(false) {} bitfield(): m_bytes(0), m_size(0), m_own(false) {}
bitfield(int bits): m_bytes(0), m_size(0) bitfield(int bits): m_bytes(0), m_size(0), m_own(false)
{ resize(bits); } { resize(bits); }
bitfield(int bits, bool val): m_bytes(0), m_size(0) bitfield(int bits, bool val): m_bytes(0), m_size(0), m_own(f alse)
{ resize(bits, val); } { resize(bits, val); }
bitfield(char const* b, int bits): m_bytes(0), m_size(0) bitfield(char const* b, int bits): m_bytes(0), m_size(0), m_ own(false)
{ assign(b, bits); } { assign(b, bits); }
bitfield(bitfield const& rhs): m_bytes(0), m_size(0), m_own( false) bitfield(bitfield const& rhs): m_bytes(0), m_size(0), m_own( false)
{ assign(rhs.bytes(), rhs.size()); } { assign(rhs.bytes(), rhs.size()); }
void borrow_bytes(char* b, int bits) void borrow_bytes(char* b, int bits)
{ {
dealloc(); dealloc();
m_bytes = (unsigned char*)b; m_bytes = (unsigned char*)b;
m_size = bits; m_size = bits;
m_own = false; m_own = false;
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 create_torrent.hpp   create_torrent.hpp 
skipping to change at line 91 skipping to change at line 91
, int pad_file_limit = -1, int flags = optimize); , int pad_file_limit = -1, int flags = optimize);
create_torrent(torrent_info const& ti); create_torrent(torrent_info const& ti);
entry generate() const; entry generate() const;
file_storage const& files() const { return m_files; } file_storage const& files() const { return m_files; }
void set_comment(char const* str); void set_comment(char const* str);
void set_creator(char const* str); void set_creator(char const* str);
void set_hash(int index, sha1_hash const& h); void set_hash(int index, sha1_hash const& h);
void add_url_seed(std::string const& url); void add_url_seed(std::string const& url);
void add_http_seed(std::string const& url);
void add_node(std::pair<std::string, int> const& node); void add_node(std::pair<std::string, int> const& node);
void add_tracker(std::string const& url, int tier = 0); void add_tracker(std::string const& url, int tier = 0);
void set_priv(bool p) { m_private = p; } void set_priv(bool p) { m_private = p; }
int num_pieces() const { return m_files.num_pieces(); } int num_pieces() const { return m_files.num_pieces(); }
int piece_length() const { return m_files.piece_length(); } int piece_length() const { return m_files.piece_length(); }
int piece_size(int i) const { return m_files.piece_size(i); } int piece_size(int i) const { return m_files.piece_size(i); }
bool priv() const { return m_private; } bool priv() const { return m_private; }
private: private:
skipping to change at line 160 skipping to change at line 161
bool m_merkle_torrent:1; bool m_merkle_torrent:1;
// if set, include the 'mtime' modification time in the // if set, include the 'mtime' modification time in the
// torrent file // torrent file
bool m_include_mtime:1; bool m_include_mtime:1;
// if set, symbolic links are declared as such in // if set, symbolic links are declared as such in
// the torrent file. The full data of the pointed-to // the torrent file. The full data of the pointed-to
// file is still included // file is still included
bool m_include_symlinks:1; bool m_include_symlinks:1;
// this is added at the end in order to maintain binary
// compatibility with previous 0.15.x releases. In the
// next full version release this member has been moved
// to a more reasonable location
std::vector<std::string> m_http_seeds;
}; };
namespace detail namespace detail
{ {
inline bool default_pred(boost::filesystem::path const&) { r eturn true; } inline bool default_pred(boost::filesystem::path const&) { r eturn true; }
#if TORRENT_USE_WPATH #if TORRENT_USE_WPATH
inline bool wdefault_pred(boost::filesystem::wpath const&) { return true; } inline bool wdefault_pred(boost::filesystem::wpath const&) { return true; }
#endif #endif
inline bool ignore_subdir(std::string const& leaf) inline bool ignore_subdir(std::string const& leaf)
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added


 http_tracker_connection.hpp   http_tracker_connection.hpp 
skipping to change at line 93 skipping to change at line 93
private: private:
boost::intrusive_ptr<http_tracker_connection> self() boost::intrusive_ptr<http_tracker_connection> self()
{ return boost::intrusive_ptr<http_tracker_connection>(this) ; } { return boost::intrusive_ptr<http_tracker_connection>(this) ; }
void on_filter(http_connection& c, std::list<tcp::endpoint>& endpoints); void on_filter(http_connection& c, std::list<tcp::endpoint>& endpoints);
void on_connect(http_connection& c); void on_connect(http_connection& c);
void on_response(error_code const& ec, http_parser const& pa rser void on_response(error_code const& ec, http_parser const& pa rser
, char const* data, int size); , char const* data, int size);
virtual void on_timeout() {} virtual void on_timeout(error_code const& ec) {}
void parse(int status_code, lazy_entry const& e); void parse(int status_code, lazy_entry const& e);
bool extract_peer_info(lazy_entry const& e, peer_entry& ret) ; bool extract_peer_info(lazy_entry const& e, peer_entry& ret) ;
tracker_manager& m_man; tracker_manager& m_man;
boost::shared_ptr<http_connection> m_tracker_connection; boost::shared_ptr<http_connection> m_tracker_connection;
aux::session_impl const& m_ses; aux::session_impl const& m_ses;
address m_tracker_ip; address m_tracker_ip;
proxy_settings const& m_ps; proxy_settings const& m_ps;
connection_queue& m_cc; connection_queue& m_cc;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 ip_filter.hpp   ip_filter.hpp 
skipping to change at line 89 skipping to change at line 89
return zero; return zero;
} }
template<> template<>
inline boost::uint16_t zero<boost::uint16_t>() { return 0; } inline boost::uint16_t zero<boost::uint16_t>() { return 0; }
template<class Addr> template<class Addr>
Addr plus_one(Addr const& a) Addr plus_one(Addr const& a)
{ {
Addr tmp(a); Addr tmp(a);
for (int i = tmp.size() - 1; i >= 0; --i) for (int i = int(tmp.size()) - 1; i >= 0; --i)
{ {
if (tmp[i] < (std::numeric_limits<typename Addr::val ue_type>::max)()) if (tmp[i] < (std::numeric_limits<typename Addr::val ue_type>::max)())
{ {
tmp[i] += 1; tmp[i] += 1;
break; break;
} }
tmp[i] = 0; tmp[i] = 0;
} }
return tmp; return tmp;
} }
inline boost::uint16_t plus_one(boost::uint16_t val) { return val + 1; } inline boost::uint16_t plus_one(boost::uint16_t val) { return val + 1; }
template<class Addr> template<class Addr>
Addr minus_one(Addr const& a) Addr minus_one(Addr const& a)
{ {
Addr tmp(a); Addr tmp(a);
for (int i = tmp.size() - 1; i >= 0; --i) for (int i = int(tmp.size()) - 1; i >= 0; --i)
{ {
if (tmp[i] > 0) if (tmp[i] > 0)
{ {
tmp[i] -= 1; tmp[i] -= 1;
break; break;
} }
tmp[i] = (std::numeric_limits<typename Addr::value_t ype>::max)(); tmp[i] = (std::numeric_limits<typename Addr::value_t ype>::max)();
} }
return tmp; return tmp;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 msg.hpp   msg.hpp 
skipping to change at line 86 skipping to change at line 86
// if this is a nodes response, these are the nodes // if this is a nodes response, these are the nodes
typedef std::vector<node_entry> nodes_t; typedef std::vector<node_entry> nodes_t;
nodes_t nodes; nodes_t nodes;
typedef std::vector<tcp::endpoint> peers_t; typedef std::vector<tcp::endpoint> peers_t;
peers_t peers; peers_t peers;
// similar to transaction_id but for write operations. // similar to transaction_id but for write operations.
std::string write_token; std::string write_token;
// if non-empty, include the "ip" key in the response
std::string ip;
// the info has for peer_requests, announce_peer // the info has for peer_requests, announce_peer
// and responses // and responses
node_id info_hash; node_id info_hash;
// port for announce_peer messages // port for announce_peer messages
int port; int port;
// ERROR MESSAGES // ERROR MESSAGES
int error_code; int error_code;
std::string error_msg; std::string error_msg;
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 node_id.hpp   node_id.hpp 
skipping to change at line 41 skipping to change at line 41
*/ */
#ifndef NODE_ID_HPP #ifndef NODE_ID_HPP
#define NODE_ID_HPP #define NODE_ID_HPP
#include <algorithm> #include <algorithm>
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#include "libtorrent/peer_id.hpp" #include "libtorrent/peer_id.hpp"
#include "libtorrent/assert.hpp" #include "libtorrent/assert.hpp"
#include "libtorrent/socket.hpp"
namespace libtorrent { namespace dht namespace libtorrent { namespace dht
{ {
typedef libtorrent::big_number node_id; typedef libtorrent::big_number node_id;
// returns the distance between the two nodes // returns the distance between the two nodes
// using the kademlia XOR-metric // using the kademlia XOR-metric
node_id TORRENT_EXPORT distance(node_id const& n1, node_id const& n2); node_id TORRENT_EXPORT distance(node_id const& n1, node_id const& n2);
// returns true if: distance(n1, ref) < distance(n2, ref) // returns true if: distance(n1, ref) < distance(n2, ref)
bool TORRENT_EXPORT compare_ref(node_id const& n1, node_id const& n2, node_ id const& ref); bool TORRENT_EXPORT compare_ref(node_id const& n1, node_id const& n2, node_ id const& ref);
// returns n in: 2^n <= distance(n1, n2) < 2^(n+1) // returns n in: 2^n <= distance(n1, n2) < 2^(n+1)
// usefult for finding out which bucket a node belongs to // usefult for finding out which bucket a node belongs to
int TORRENT_EXPORT distance_exp(node_id const& n1, node_id const& n2); int TORRENT_EXPORT distance_exp(node_id const& n1, node_id const& n2);
node_id TORRENT_EXPORT generate_id(); node_id TORRENT_EXPORT generate_id();
bool TORRENT_EXPORT verify_id(node_id const& nid, address const& source_ip)
;
} } // namespace libtorrent::dht } } // namespace libtorrent::dht
#endif // NODE_ID_HPP #endif // NODE_ID_HPP
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added


 peer_connection.hpp   peer_connection.hpp 
skipping to change at line 233 skipping to change at line 233
void prefer_whole_pieces(int num) void prefer_whole_pieces(int num)
{ m_prefer_whole_pieces = num; } { m_prefer_whole_pieces = num; }
bool request_large_blocks() const bool request_large_blocks() const
{ return m_request_large_blocks; } { return m_request_large_blocks; }
void request_large_blocks(bool b) void request_large_blocks(bool b)
{ m_request_large_blocks = b; } { m_request_large_blocks = b; }
void set_endgame(bool b) { m_endgame_mode = b; }
bool endgame() const { return m_endgame_mode; }
bool no_download() const { return m_no_download; } bool no_download() const { return m_no_download; }
void no_download(bool b) { m_no_download = b; } void no_download(bool b) { m_no_download = b; }
void set_priority(int p) void set_priority(int p)
{ {
TORRENT_ASSERT(p > 0); TORRENT_ASSERT(p > 0);
TORRENT_ASSERT(m_priority <= 255); TORRENT_ASSERT(m_priority <= 255);
if (p > 255) p = 255; if (p > 255) p = 255;
m_priority = p; m_priority = p;
} }
skipping to change at line 320 skipping to change at line 323
bitfield const& get_bitfield() const; bitfield const& get_bitfield() const;
std::vector<int> const& allowed_fast(); std::vector<int> const& allowed_fast();
std::vector<int> const& suggested_pieces() const { return m_ suggested_pieces; } std::vector<int> const& suggested_pieces() const { return m_ suggested_pieces; }
ptime connected_time() const { return m_connect; } ptime connected_time() const { return m_connect; }
ptime last_received() const { return m_last_receive; } ptime last_received() const { return m_last_receive; }
void on_timeout(); void on_timeout();
// this will cause this peer_connection to be disconnected. // this will cause this peer_connection to be disconnected.
virtual void disconnect(error_code const& ec, int error = 0) ; void disconnect(error_code const& ec, int error = 0);
bool is_disconnecting() const { return m_disconnecting; } bool is_disconnecting() const { return m_disconnecting; }
// this is called when the connection attempt has succeeded // this is called when the connection attempt has succeeded
// and the peer_connection is supposed to set m_connecting // and the peer_connection is supposed to set m_connecting
// to false, and stop monitor writability // to false, and stop monitor writability
void on_connection_complete(error_code const& e); void on_connection_complete(error_code const& e);
// returns true if this connection is still waiting to // returns true if this connection is still waiting to
// finish the connection attempt // finish the connection attempt
bool is_connecting() const { return m_connecting; } bool is_connecting() const { return m_connecting; }
skipping to change at line 374 skipping to change at line 377
{ return m_ignore_bandwidth_limits; } { return m_ignore_bandwidth_limits; }
void ignore_bandwidth_limits(bool i) void ignore_bandwidth_limits(bool i)
{ m_ignore_bandwidth_limits = i; } { m_ignore_bandwidth_limits = i; }
bool ignore_unchoke_slots() const; bool ignore_unchoke_slots() const;
void ignore_unchoke_slots(bool i) void ignore_unchoke_slots(bool i)
{ m_ignore_unchoke_slots = i; } { m_ignore_unchoke_slots = i; }
bool failed() const { return m_failed; } bool failed() const { return m_failed; }
int desired_queue_size() const { return m_desired_queue_size int desired_queue_size() const
; } {
// this peer is in end-game mode we only want
// one outstanding request
return m_endgame_mode ? 1: m_desired_queue_size;
}
// compares this connection against the given connection // compares this connection against the given connection
// for which one is more eligible for an unchoke. // for which one is more eligible for an unchoke.
// returns true if this is more eligible // returns true if this is more eligible
bool unchoke_compare(boost::intrusive_ptr<peer_connection co nst> const& p) const; bool unchoke_compare(boost::intrusive_ptr<peer_connection co nst> const& p) const;
bool upload_rate_compare(peer_connection const* p) const; bool upload_rate_compare(peer_connection const* p) const;
// resets the byte counters that are used to measure // resets the byte counters that are used to measure
// the number of bytes transferred within unchoke cycles // the number of bytes transferred within unchoke cycles
void reset_choke_counters(); void reset_choke_counters();
skipping to change at line 1025 skipping to change at line 1033
// is set to 1 // is set to 1
bool m_snubbed:1; bool m_snubbed:1;
// this is set to true once the bitfield is received // this is set to true once the bitfield is received
bool m_bitfield_received:1; bool m_bitfield_received:1;
// if this is set to true, the client will not // if this is set to true, the client will not
// pick any pieces from this peer // pick any pieces from this peer
bool m_no_download:1; bool m_no_download:1;
// this is set to true if the last time we tried to
// pick a piece to download, we could only find
// blocks that were already requested from other
// peers. In this case, we should not try to pick
// another piece until the last one we requested is done
bool m_endgame_mode:1;
template <std::size_t Size> template <std::size_t Size>
struct handler_storage struct handler_storage
{ {
#ifdef TORRENT_DEBUG #ifdef TORRENT_DEBUG
handler_storage() handler_storage()
: used(false) : used(false)
{} {}
bool used; bool used;
#endif #endif
 End of changes. 4 change blocks. 
3 lines changed or deleted 17 lines changed or added


 peer_id.hpp   peer_id.hpp 
skipping to change at line 68 skipping to change at line 68
namespace libtorrent namespace libtorrent
{ {
class TORRENT_EXPORT big_number class TORRENT_EXPORT big_number
{ {
// the number of bytes of the number // the number of bytes of the number
enum { number_size = 20 }; enum { number_size = 20 };
public: public:
enum { size = number_size }; enum { size = number_size };
big_number() {} big_number() { clear(); }
explicit big_number(char const* s) explicit big_number(char const* s)
{ {
if (s == 0) clear(); if (s == 0) clear();
else std::memcpy(m_number, s, size); else std::memcpy(m_number, s, size);
} }
explicit big_number(std::string const& s) explicit big_number(std::string const& s)
{ {
TORRENT_ASSERT(s.size() >= 20); TORRENT_ASSERT(s.size() >= 20);
skipping to change at line 90 skipping to change at line 90
std::memcpy(m_number, &s[0], sl); std::memcpy(m_number, &s[0], sl);
} }
void assign(std::string const& s) void assign(std::string const& s)
{ {
TORRENT_ASSERT(s.size() >= 20); TORRENT_ASSERT(s.size() >= 20);
int sl = int(s.size()) < size ? int(s.size()) : size ; int sl = int(s.size()) < size ? int(s.size()) : size ;
std::memcpy(m_number, &s[0], sl); std::memcpy(m_number, &s[0], sl);
} }
void assign(char const* str) void assign(char const* str) { std::memcpy(m_number, str, si
{ ze); }
std::memcpy(m_number, str, size); void clear() { std::memset(m_number, 0, number_size); }
}
void clear()
{
std::fill(m_number,m_number+number_size,(const unsig
ned char)(0));
}
bool is_all_zeros() const bool is_all_zeros() const
{ {
for (const unsigned char* i = m_number; i < m_number +number_size; ++i) for (const unsigned char* i = m_number; i < m_number +number_size; ++i)
if (*i != 0) return false; if (*i != 0) return false;
return true; return true;
} }
bool operator==(big_number const& n) const bool operator==(big_number const& n) const
{ {
 End of changes. 2 change blocks. 
11 lines changed or deleted 4 lines changed or added


 peer_info.hpp   peer_info.hpp 
skipping to change at line 61 skipping to change at line 61
remote_choked = 0x8, remote_choked = 0x8,
supports_extensions = 0x10, supports_extensions = 0x10,
local_connection = 0x20, local_connection = 0x20,
handshake = 0x40, handshake = 0x40,
connecting = 0x80, connecting = 0x80,
queued = 0x100, queued = 0x100,
on_parole = 0x200, on_parole = 0x200,
seed = 0x400, seed = 0x400,
optimistic_unchoke = 0x800, optimistic_unchoke = 0x800,
snubbed = 0x1000, snubbed = 0x1000,
upload_only = 0x2000 upload_only = 0x2000,
endgame_mode = 0x4000
#ifndef TORRENT_DISABLE_ENCRYPTION #ifndef TORRENT_DISABLE_ENCRYPTION
, rc4_encrypted = 0x100000, , rc4_encrypted = 0x100000,
plaintext_encrypted = 0x200000 plaintext_encrypted = 0x200000
#endif #endif
}; };
unsigned int flags; unsigned int flags;
enum peer_source_flags enum peer_source_flags
{ {
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 session.hpp   session.hpp 
skipping to change at line 225 skipping to change at line 225
, fs::path logpath = "." , fs::path logpath = "."
#endif #endif
); );
~session(); ~session();
enum save_state_flags_t enum save_state_flags_t
{ {
save_settings = 0x001, save_settings = 0x001,
save_dht_settings = 0x002, save_dht_settings = 0x002,
#ifndef TORRENT_NO_DEPRECATE
save_dht_proxy = 0x004, save_dht_proxy = 0x004,
#endif
save_dht_state = 0x008, save_dht_state = 0x008,
save_i2p_proxy = 0x010, save_i2p_proxy = 0x010,
save_encryption_settings = 0x020, save_encryption_settings = 0x020,
#ifndef TORRENT_NO_DEPRECATE
save_peer_proxy = 0x040, save_peer_proxy = 0x040,
save_web_proxy = 0x080, save_web_proxy = 0x080,
save_tracker_proxy = 0x100, save_tracker_proxy = 0x100,
save_as_map = 0x200 #endif
save_as_map = 0x200,
save_proxy = 0x1c4
}; };
void save_state(entry& e, boost::uint32_t flags = 0xffffffff ) const; void save_state(entry& e, boost::uint32_t flags = 0xffffffff ) const;
void load_state(lazy_entry const& e); void load_state(lazy_entry const& e);
// returns a list of all torrents in this session // returns a list of all torrents in this session
std::vector<torrent_handle> get_torrents() const; std::vector<torrent_handle> get_torrents() const;
io_service& get_io_service(); io_service& get_io_service();
// returns an invalid handle in case the torrent doesn't exi st // returns an invalid handle in case the torrent doesn't exi st
skipping to change at line 396 skipping to change at line 401
{ {
add_default_plugins = 1, add_default_plugins = 1,
start_default_features = 2 start_default_features = 2
}; };
void remove_torrent(const torrent_handle& h, int options = n one); void remove_torrent(const torrent_handle& h, int options = n one);
void set_settings(session_settings const& s); void set_settings(session_settings const& s);
session_settings const& settings(); session_settings const& settings();
void set_peer_proxy(proxy_settings const& s); void set_proxy(proxy_settings const& s);
void set_web_seed_proxy(proxy_settings const& s); proxy_settings const& proxy() const;
void set_tracker_proxy(proxy_settings const& s);
proxy_settings const& peer_proxy() const; #ifndef TORRENT_NO_DEPRECATE
proxy_settings const& web_seed_proxy() const; // deprecated in 0.15.
proxy_settings const& tracker_proxy() const; TORRENT_DEPRECATED_PREFIX
void set_peer_proxy(proxy_settings const& s) TORRENT_DEPRECA
TED;
TORRENT_DEPRECATED_PREFIX
void set_web_seed_proxy(proxy_settings const& s) TORRENT_DEP
RECATED;
TORRENT_DEPRECATED_PREFIX
void set_tracker_proxy(proxy_settings const& s) TORRENT_DEPR
ECATED;
TORRENT_DEPRECATED_PREFIX
proxy_settings const& peer_proxy() const TORRENT_DEPRECATED;
TORRENT_DEPRECATED_PREFIX
proxy_settings const& web_seed_proxy() const TORRENT_DEPRECA
TED;
TORRENT_DEPRECATED_PREFIX
proxy_settings const& tracker_proxy() const TORRENT_DEPRECAT
ED;
#ifndef TORRENT_DISABLE_DHT #ifndef TORRENT_DISABLE_DHT
void set_dht_proxy(proxy_settings const& s); TORRENT_DEPRECATED_PREFIX
proxy_settings const& dht_proxy() const; void set_dht_proxy(proxy_settings const& s) TORRENT_DEPRECAT
ED;
TORRENT_DEPRECATED_PREFIX
proxy_settings const& dht_proxy() const TORRENT_DEPRECATED;
#endif #endif
#endif // TORRENT_NO_DEPRECATE
int upload_rate_limit() const; int upload_rate_limit() const;
int download_rate_limit() const; int download_rate_limit() const;
int local_upload_rate_limit() const; int local_upload_rate_limit() const;
int local_download_rate_limit() const; int local_download_rate_limit() const;
int max_half_open_connections() const; int max_half_open_connections() const;
void set_local_upload_rate_limit(int bytes_per_second); void set_local_upload_rate_limit(int bytes_per_second);
void set_local_download_rate_limit(int bytes_per_second); void set_local_download_rate_limit(int bytes_per_second);
void set_upload_rate_limit(int bytes_per_second); void set_upload_rate_limit(int bytes_per_second);
 End of changes. 8 change blocks. 
9 lines changed or deleted 34 lines changed or added


 session_impl.hpp   session_impl.hpp 
skipping to change at line 293 skipping to change at line 293
void abort(); void abort();
torrent_handle find_torrent_handle(sha1_hash const& info_hash); torrent_handle find_torrent_handle(sha1_hash const& info_hash);
void announce_lsd(sha1_hash const& ih); void announce_lsd(sha1_hash const& ih);
void save_state(entry& e, boost::uint32_t flags, ses sion_impl::mutex_t::scoped_lock& l) const; void save_state(entry& e, boost::uint32_t flags, ses sion_impl::mutex_t::scoped_lock& l) const;
void load_state(lazy_entry const& e); void load_state(lazy_entry const& e);
void set_proxy(proxy_settings const& s);
proxy_settings const& proxy() const { return m_peer_
proxy; }
#ifndef TORRENT_NO_DEPRECATE
void set_peer_proxy(proxy_settings const& s) void set_peer_proxy(proxy_settings const& s)
{ {
m_peer_proxy = s; m_peer_proxy = s;
// in case we just set a socks proxy, we mig ht have to // in case we just set a socks proxy, we mig ht have to
// open the socks incoming connection // open the socks incoming connection
if (!m_socks_listen_socket) open_new_incomin g_socks_connection(); if (!m_socks_listen_socket) open_new_incomin g_socks_connection();
} }
void set_web_seed_proxy(proxy_settings const& s) void set_web_seed_proxy(proxy_settings const& s)
{ m_web_seed_proxy = s; } { m_web_seed_proxy = s; }
void set_tracker_proxy(proxy_settings const& s) void set_tracker_proxy(proxy_settings const& s)
skipping to change at line 321 skipping to change at line 325
#ifndef TORRENT_DISABLE_DHT #ifndef TORRENT_DISABLE_DHT
void set_dht_proxy(proxy_settings const& s) void set_dht_proxy(proxy_settings const& s)
{ {
m_dht_proxy = s; m_dht_proxy = s;
m_dht_socket.set_proxy_settings(s); m_dht_socket.set_proxy_settings(s);
} }
proxy_settings const& dht_proxy() const proxy_settings const& dht_proxy() const
{ return m_dht_proxy; } { return m_dht_proxy; }
#endif #endif
#endif // TORRENT_NO_DEPRECATE
#ifndef TORRENT_DISABLE_GEO_IP #ifndef TORRENT_DISABLE_GEO_IP
std::string as_name_for_ip(address const& a); std::string as_name_for_ip(address const& a);
int as_for_ip(address const& a); int as_for_ip(address const& a);
std::pair<const int, int>* lookup_as(int as); std::pair<const int, int>* lookup_as(int as);
bool load_asnum_db(char const* file); bool load_asnum_db(char const* file);
bool has_asnum_db() const { return m_asnum_db; } bool has_asnum_db() const { return m_asnum_db; }
bool load_country_db(char const* file); bool load_country_db(char const* file);
bool has_country_db() const { return m_country_db; } bool has_country_db() const { return m_country_db; }
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added


 session_settings.hpp   session_settings.hpp 
skipping to change at line 124 skipping to change at line 124
, allowed_fast_set_size(10) , allowed_fast_set_size(10)
, max_queued_disk_bytes(256 * 1024) , max_queued_disk_bytes(256 * 1024)
, handshake_timeout(10) , handshake_timeout(10)
#ifndef TORRENT_DISABLE_DHT #ifndef TORRENT_DISABLE_DHT
, use_dht_as_fallback(false) , use_dht_as_fallback(false)
#endif #endif
, free_torrent_hashes(true) , free_torrent_hashes(true)
, upnp_ignore_nonrouters(false) , upnp_ignore_nonrouters(false)
, send_buffer_watermark(100 * 1024) , send_buffer_watermark(100 * 1024)
, auto_upload_slots(true) , auto_upload_slots(true)
, auto_upload_slots_rate_based(true) , auto_upload_slots_rate_based(false)
, use_parole_mode(true) , use_parole_mode(true)
, cache_size(1024) , cache_size(1024)
, cache_buffer_chunk_size(16) , cache_buffer_chunk_size(16)
, cache_expiry(60) , cache_expiry(60)
, use_read_cache(true) , use_read_cache(true)
, disk_io_write_mode(0) , disk_io_write_mode(0)
, disk_io_read_mode(0) , disk_io_read_mode(0)
, coalesce_reads(false) , coalesce_reads(false)
, coalesce_writes(false) , coalesce_writes(false)
, outgoing_ports(0,0) , outgoing_ports(0,0)
, peer_tos(0) , peer_tos(0)
, active_downloads(8) , active_downloads(8)
, active_seeds(5) , active_seeds(5)
, active_limit(15) , active_limit(15)
, auto_manage_prefer_seeds(false) , auto_manage_prefer_seeds(false)
, dont_count_slow_torrents(true) , dont_count_slow_torrents(true)
, auto_manage_interval(30) , auto_manage_interval(30)
, share_ratio_limit(2.f) , share_ratio_limit(2.f)
, seed_time_ratio_limit(7.f) , seed_time_ratio_limit(7.f)
, seed_time_limit(24 * 60 * 60) // 24 hours , seed_time_limit(24 * 60 * 60) // 24 hours
, peer_turnover(1 / 100.f) , peer_turnover(2 / 50.f)
, peer_turnover_cutoff(1.1f) // disable until the cr , peer_turnover_cutoff(.9f)
ash is resolved
, close_redundant_connections(true) , close_redundant_connections(true)
, auto_scrape_interval(1800) , auto_scrape_interval(1800)
, auto_scrape_min_interval(300) , auto_scrape_min_interval(300)
, max_peerlist_size(4000) , max_peerlist_size(4000)
, max_paused_peerlist_size(4000) , max_paused_peerlist_size(4000)
, min_announce_interval(5 * 60) , min_announce_interval(5 * 60)
, prioritize_partial_pieces(false) , prioritize_partial_pieces(false)
, auto_manage_startup(120) , auto_manage_startup(120)
, rate_limit_ip_overhead(true) , rate_limit_ip_overhead(true)
, announce_to_all_trackers(false) , announce_to_all_trackers(false)
, announce_to_all_tiers(false) , announce_to_all_tiers(false)
, prefer_udp_trackers(true) , prefer_udp_trackers(true)
, strict_super_seeding(false) , strict_super_seeding(false)
, seeding_piece_quota(3) , seeding_piece_quota(20)
#ifdef TORRENT_WINDOWS #ifdef TORRENT_WINDOWS
, max_sparse_regions(30000) , max_sparse_regions(30000)
#else #else
, max_sparse_regions(0) , max_sparse_regions(0)
#endif #endif
#ifndef TORRENT_DISABLE_MLOCK #ifndef TORRENT_DISABLE_MLOCK
, lock_disk_cache(false) , lock_disk_cache(false)
#endif #endif
, max_rejects(50) , max_rejects(50)
, recv_socket_buffer_size(0) , recv_socket_buffer_size(0)
 End of changes. 3 change blocks. 
5 lines changed or deleted 4 lines changed or added


 torrent.hpp   torrent.hpp 
skipping to change at line 163 skipping to change at line 163
#endif #endif
// this is called when the torrent has metadata. // this is called when the torrent has metadata.
// it will initialize the storage and the piece-picker // it will initialize the storage and the piece-picker
void init(); void init();
void on_resume_data_checked(int ret, disk_io_job const& j); void on_resume_data_checked(int ret, disk_io_job const& j);
void on_force_recheck(int ret, disk_io_job const& j); void on_force_recheck(int ret, disk_io_job const& j);
void on_piece_checked(int ret, disk_io_job const& j); void on_piece_checked(int ret, disk_io_job const& j);
void files_checked_lock(); void files_checked_lock();
void files_checked(aux::session_impl::mutex_t::scoped_lock c onst&); void files_checked(boost::mutex::scoped_lock const&);
void start_checking(); void start_checking();
void start_announcing(); void start_announcing();
void stop_announcing(); void stop_announcing();
void send_upload_only(); void send_upload_only();
void set_upload_mode(bool b); void set_upload_mode(bool b);
bool upload_mode() const { return m_upload_mode; } bool upload_mode() const { return m_upload_mode; }
bool is_upload_only() const bool is_upload_only() const
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 torrent_handle.hpp   torrent_handle.hpp 
skipping to change at line 44 skipping to change at line 44
#define TORRENT_TORRENT_HANDLE_HPP_INCLUDED #define TORRENT_TORRENT_HANDLE_HPP_INCLUDED
#include <vector> #include <vector>
#include <set> #include <set>
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push, 1) #pragma warning(push, 1)
#endif #endif
#include <boost/date_time/posix_time/posix_time_types.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(pop) #pragma warning(pop)
#endif #endif
#include "libtorrent/peer_id.hpp" #include "libtorrent/peer_id.hpp"
#include "libtorrent/peer_info.hpp" #include "libtorrent/peer_info.hpp"
#include "libtorrent/piece_picker.hpp" #include "libtorrent/piece_picker.hpp"
#include "libtorrent/torrent_info.hpp" #include "libtorrent/torrent_info.hpp"
#include "libtorrent/time.hpp" #include "libtorrent/time.hpp"
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 tracker_manager.hpp   tracker_manager.hpp 
skipping to change at line 82 skipping to change at line 82
struct tracker_connection; struct tracker_connection;
namespace aux { struct session_impl; } namespace aux { struct session_impl; }
// returns -1 if gzip header is invalid or the header size in bytes // returns -1 if gzip header is invalid or the header size in bytes
TORRENT_EXPORT int gzip_header(const char* buf, int size); TORRENT_EXPORT int gzip_header(const char* buf, int size);
struct TORRENT_EXPORT tracker_request struct TORRENT_EXPORT tracker_request
{ {
tracker_request() tracker_request()
: kind(announce_request) : kind(announce_request)
, downloaded(-1)
, uploaded(-1)
, left(-1)
, corrupt(0)
, redundant(0)
, event(none) , event(none)
, key(0) , key(0)
, num_want(0) , num_want(0)
, send_stats(true) , send_stats(true)
{} {}
enum enum
{ {
announce_request, announce_request,
scrape_request scrape_request
skipping to change at line 108 skipping to change at line 113
started, started,
stopped stopped
}; };
sha1_hash info_hash; sha1_hash info_hash;
peer_id pid; peer_id pid;
size_type downloaded; size_type downloaded;
size_type uploaded; size_type uploaded;
size_type left; size_type left;
size_type corrupt; size_type corrupt;
size_type redundant;
unsigned short listen_port; unsigned short listen_port;
event_t event; event_t event;
std::string url; std::string url;
int key; int key;
int num_want; int num_want;
std::string ipv6; std::string ipv6;
std::string ipv4; std::string ipv4;
address bind_ip; address bind_ip;
bool send_stats; bool send_stats;
}; };
skipping to change at line 166 skipping to change at line 172
: intrusive_ptr_base<timeout_handler> : intrusive_ptr_base<timeout_handler>
, boost::noncopyable , boost::noncopyable
{ {
timeout_handler(io_service& str); timeout_handler(io_service& str);
void set_timeout(int completion_timeout, int read_timeout); void set_timeout(int completion_timeout, int read_timeout);
void restart_read_timeout(); void restart_read_timeout();
void cancel(); void cancel();
bool cancelled() const { return m_abort; } bool cancelled() const { return m_abort; }
virtual void on_timeout() = 0; virtual void on_timeout(error_code const& ec) = 0;
virtual ~timeout_handler() {} virtual ~timeout_handler() {}
private: private:
void timeout_callback(error_code const&); void timeout_callback(error_code const&);
boost::intrusive_ptr<timeout_handler> self() boost::intrusive_ptr<timeout_handler> self()
{ return boost::intrusive_ptr<timeout_handler>(this); } { return boost::intrusive_ptr<timeout_handler>(this); }
// used for timeouts // used for timeouts
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added


 udp_socket.hpp   udp_socket.hpp 
skipping to change at line 87 skipping to change at line 87
protected: protected:
struct queued_packet struct queued_packet
{ {
udp::endpoint ep; udp::endpoint ep;
buffer buf; buffer buf;
}; };
private: private:
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined T
ORRENT_ERROR_LOGGING
// necessary for logging member offsets
public:
#endif
callback_t m_callback; callback_t m_callback;
typedef boost::mutex mutex_t; typedef boost::mutex mutex_t;
void on_read(udp::socket* sock, error_code const& e, std::si ze_t bytes_transferred); void on_read(udp::socket* sock, error_code const& e, std::si ze_t bytes_transferred);
void on_name_lookup(error_code const& e, tcp::resolver::iter ator i); void on_name_lookup(error_code const& e, tcp::resolver::iter ator i);
void on_timeout(); void on_timeout();
void on_connect(int ticket); void on_connect(int ticket);
void on_connected(error_code const& ec); void on_connected(error_code const& ec);
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 udp_tracker_connection.hpp   udp_tracker_connection.hpp 
skipping to change at line 81 skipping to change at line 81
, connection_queue& cc , connection_queue& cc
, tracker_manager& man , tracker_manager& man
, tracker_request const& req , tracker_request const& req
, boost::weak_ptr<request_callback> c , boost::weak_ptr<request_callback> c
, aux::session_impl const& ses , aux::session_impl const& ses
, proxy_settings const& ps); , proxy_settings const& ps);
void start(); void start();
void close(); void close();
#if !defined TORRENT_VERBOSE_LOGGING && !defined TORRENT_LOGGING && !define
d TORRENT_ERROR_LOGGING
// necessary for logging member offsets
private: private:
#endif
enum action_t enum action_t
{ {
action_connect, action_connect,
action_announce, action_announce,
action_scrape, action_scrape,
action_error action_error
}; };
boost::intrusive_ptr<udp_tracker_connection> self() boost::intrusive_ptr<udp_tracker_connection> self()
skipping to change at line 107 skipping to change at line 110
void on_receive(error_code const& e, udp::endpoint const& ep void on_receive(error_code const& e, udp::endpoint const& ep
, char const* buf, int size); , char const* buf, int size);
void on_connect_response(char const* buf, int size); void on_connect_response(char const* buf, int size);
void on_announce_response(char const* buf, int size); void on_announce_response(char const* buf, int size);
void on_scrape_response(char const* buf, int size); void on_scrape_response(char const* buf, int size);
void send_udp_connect(); void send_udp_connect();
void send_udp_announce(); void send_udp_announce();
void send_udp_scrape(); void send_udp_scrape();
virtual void on_timeout(); virtual void on_timeout(error_code const& ec);
tracker_manager& m_man; tracker_manager& m_man;
udp::resolver m_name_lookup; udp::resolver m_name_lookup;
udp_socket m_socket; udp_socket m_socket;
udp::endpoint m_target; udp::endpoint m_target;
std::list<udp::endpoint> m_endpoints; std::list<udp::endpoint> m_endpoints;
int m_transaction_id; int m_transaction_id;
aux::session_impl const& m_ses; aux::session_impl const& m_ses;
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 lines changed or added


 version.hpp   version.hpp 
skipping to change at line 38 skipping to change at line 38
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef TORRENT_VERSION_HPP_INCLUDED #ifndef TORRENT_VERSION_HPP_INCLUDED
#define TORRENT_VERSION_HPP_INCLUDED #define TORRENT_VERSION_HPP_INCLUDED
#define LIBTORRENT_VERSION_MAJOR 0 #define LIBTORRENT_VERSION_MAJOR 0
#define LIBTORRENT_VERSION_MINOR 15 #define LIBTORRENT_VERSION_MINOR 15
#define LIBTORRENT_VERSION_TINY 4 #define LIBTORRENT_VERSION_TINY 5
#define LIBTORRENT_VERSION "0.15.4.0" #define LIBTORRENT_VERSION "0.15.5.0"
#define LIBTORRENT_REVISION "$Rev: 4876 $" #define LIBTORRENT_REVISION "$Rev: 5141 $"
#endif #endif
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 web_peer_connection.hpp   web_peer_connection.hpp 
skipping to change at line 111 skipping to change at line 111
~web_peer_connection(); ~web_peer_connection();
// called from the main loop when this connection has any // called from the main loop when this connection has any
// work to do. // work to do.
void on_sent(error_code const& error void on_sent(error_code const& error
, std::size_t bytes_transferred); , std::size_t bytes_transferred);
void on_receive(error_code const& error void on_receive(error_code const& error
, std::size_t bytes_transferred); , std::size_t bytes_transferred);
virtual void disconnect(error_code const& ec, int error = 0)
;
std::string const& url() const { return m_original_url; } std::string const& url() const { return m_original_url; }
virtual void get_specific_peer_info(peer_info& p) const; virtual void get_specific_peer_info(peer_info& p) const;
virtual bool in_handshake() const; virtual bool in_handshake() const;
// the following functions appends messages // the following functions appends messages
// to the send buffer // to the send buffer
void write_choke() {} void write_choke() {}
void write_unchoke() {} void write_unchoke() {}
void write_interested() {} void write_interested() {}
 End of changes. 1 change blocks. 
3 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/