alert_types.hpp   alert_types.hpp 
skipping to change at line 361 skipping to change at line 361
{} {}
int num_peers; int num_peers;
virtual std::auto_ptr<alert> clone() const virtual std::auto_ptr<alert> clone() const
{ return std::auto_ptr<alert>(new dht_reply_alert(*this)); } { return std::auto_ptr<alert>(new dht_reply_alert(*this)); }
virtual char const* what() const { return "DHT reply"; } virtual char const* what() const { return "DHT reply"; }
virtual std::string message() const virtual std::string message() const
{ {
std::stringstream ret; std::stringstream ret;
ret << torrent_alert::message() << " received DHT pe ers: " ret << tracker_alert::message() << " received DHT pe ers: "
<< num_peers; << num_peers;
return ret.str(); return ret.str();
} }
}; };
struct TORRENT_EXPORT tracker_announce_alert: tracker_alert struct TORRENT_EXPORT tracker_announce_alert: tracker_alert
{ {
tracker_announce_alert(torrent_handle const& h tracker_announce_alert(torrent_handle const& h
, std::string const& url_, int event_) , std::string const& url_, int event_)
: tracker_alert(h, url_) : tracker_alert(h, url_)
 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 243 skipping to change at line 243
// integer // integer
case 'i': case 'i':
{ {
++in; // 'i' ++in; // 'i'
std::string val = read_until(in, end, 'e', e rr); std::string val = read_until(in, end, 'e', e rr);
if (err) return; if (err) return;
TORRENT_ASSERT(*in == 'e'); TORRENT_ASSERT(*in == 'e');
++in; // 'e' ++in; // 'e'
ret = entry(entry::int_t); ret = entry(entry::int_t);
char* end_pointer; char* end_pointer;
#ifdef TORRENT_WINDOWS #if defined TORRENT_WINDOWS && !defined TORRENT_MINGW
ret.integer() = _strtoi64(val.c_str(), &end_ pointer, 10); ret.integer() = _strtoi64(val.c_str(), &end_ pointer, 10);
#else #else
ret.integer() = strtoll(val.c_str(), &end_po inter, 10); ret.integer() = strtoll(val.c_str(), &end_po inter, 10);
#endif #endif
#ifdef TORRENT_DEBUG #ifdef TORRENT_DEBUG
ret.m_type_queried = false; ret.m_type_queried = false;
#endif #endif
if (end_pointer == val.c_str()) if (end_pointer == val.c_str())
{ {
err = true; err = true;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 config.hpp   config.hpp 
skipping to change at line 82 skipping to change at line 82
// set up defines for target environments // set up defines for target environments
#if (defined __APPLE__ && __MACH__) || defined __FreeBSD__ || defined __Net BSD__ \ #if (defined __APPLE__ && __MACH__) || defined __FreeBSD__ || defined __Net BSD__ \
|| defined __OpenBSD__ || defined __bsdi__ || defined __DragonFly__ \ || defined __OpenBSD__ || defined __bsdi__ || defined __DragonFly__ \
|| defined __FreeBSD_kernel__ || defined __FreeBSD_kernel__
#define TORRENT_BSD #define TORRENT_BSD
#elif defined __linux__ #elif defined __linux__
#define TORRENT_LINUX #define TORRENT_LINUX
#elif defined __MINGW32__ #elif defined __MINGW32__
#define TORRENT_MINGW #define TORRENT_MINGW
#define TORRENT_WINDOWS
#elif defined WIN32 #elif defined WIN32
#define TORRENT_WINDOWS #define TORRENT_WINDOWS
#elif defined sun || defined __sun #elif defined sun || defined __sun
#define TORRENT_SOLARIS #define TORRENT_SOLARIS
#else #else
#warning unknown OS, assuming BSD #warning unknown OS, assuming BSD
#define TORRENT_BSD #define TORRENT_BSD
#endif #endif
#if defined TORRENT_BSD || defined TORRENT_LINUX || defined TORRENT_SOLARIS
#define TORRENT_USE_RLIMIT 1
#else
#define TORRENT_USE_RLIMIT 0
#endif
// should wpath or path be used? // should wpath or path be used?
#if defined UNICODE && !defined BOOST_FILESYSTEM_NARROW_ONLY \ #if defined UNICODE && !defined BOOST_FILESYSTEM_NARROW_ONLY \
&& BOOST_VERSION >= 103400 && defined WIN32 && BOOST_VERSION >= 103400 && defined WIN32 && !defined TORRENT_MING W
#define TORRENT_USE_WPATH 1 #define TORRENT_USE_WPATH 1
#else #else
#define TORRENT_USE_WPATH 0 #define TORRENT_USE_WPATH 0
#endif #endif
#endif // TORRENT_CONFIG_HPP_INCLUDED #endif // TORRENT_CONFIG_HPP_INCLUDED
 End of changes. 3 change blocks. 
1 lines changed or deleted 8 lines changed or added


 dht_tracker.hpp   dht_tracker.hpp 
skipping to change at line 82 skipping to change at line 82
friend void intrusive_ptr_add_ref(dht_tracker const*); friend void intrusive_ptr_add_ref(dht_tracker const*);
friend void intrusive_ptr_release(dht_tracker const*); friend void intrusive_ptr_release(dht_tracker const*);
dht_tracker(udp_socket& sock, dht_settings const& settings dht_tracker(udp_socket& sock, dht_settings const& settings
, entry const* state); , entry const* state);
void start(entry const& bootstrap); void start(entry const& bootstrap);
void stop(); void stop();
void add_node(udp::endpoint node); void add_node(udp::endpoint node);
void add_node(std::pair<std::string, int> const& node); void add_node(std::pair<std::string, int> const& node);
void add_router_node(std::pair<std::string, int> const& node ); void add_router_node(udp::endpoint const& node);
entry state() const; entry state() const;
void announce(sha1_hash const& ih, int listen_port void announce(sha1_hash const& ih, int listen_port
, boost::function<void(std::vector<tcp::endpoint> co nst& , boost::function<void(std::vector<tcp::endpoint> co nst&
, sha1_hash const&)> f); , sha1_hash const&)> f);
void dht_status(session_status& s); void dht_status(session_status& s);
// translate bittorrent kademlia message into the generic ka demlia message // translate bittorrent kademlia message into the generic ka demlia message
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 piece_picker.hpp   piece_picker.hpp 
skipping to change at line 55 skipping to change at line 55
#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/socket.hpp" #include "libtorrent/socket.hpp"
#include "libtorrent/session_settings.hpp" #include "libtorrent/session_settings.hpp"
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#include "libtorrent/assert.hpp" #include "libtorrent/assert.hpp"
#include "libtorrent/time.hpp"
namespace libtorrent namespace libtorrent
{ {
class torrent; class torrent;
class peer_connection; class peer_connection;
struct bitfield; struct bitfield;
struct TORRENT_EXPORT piece_block struct TORRENT_EXPORT piece_block
{ {
skipping to change at line 137 skipping to change at line 138
// only pick pieces exclusively requested from this peer // only pick pieces exclusively requested from this peer
on_parole = 4, on_parole = 4,
// always pick partial pieces before any other piece // always pick partial pieces before any other piece
prioritize_partials = 8, prioritize_partials = 8,
// pick pieces in sequential order // pick pieces in sequential order
sequential = 16 sequential = 16
}; };
struct downloading_piece struct downloading_piece
{ {
downloading_piece(): finished(0), writing(0), reques ted(0) {} downloading_piece(): last_request(min_time()), finis hed(0), writing(0), requested(0) {}
piece_state_t state; piece_state_t state;
ptime last_request;
// the index of the piece // the index of the piece
int index; int index;
// info about each block // info about each block
// this is a pointer into the m_block_info // this is a pointer into the m_block_info
// vector owned by the piece_picker // vector owned by the piece_picker
block_info* info; block_info* info;
// the number of blocks in the finished state // the number of blocks in the finished state
boost::int16_t finished; boost::int16_t finished;
// the number of blocks in the writing state // the number of blocks in the writing state
skipping to change at line 275 skipping to change at line 277
// returns true if the block has been downloaded and written to disk // returns true if the block has been downloaded and written to disk
bool is_finished(piece_block block) const; bool is_finished(piece_block block) const;
// marks this piece-block as queued for downloading // marks this piece-block as queued for downloading
bool mark_as_downloading(piece_block block, void* peer bool mark_as_downloading(piece_block block, void* peer
, piece_state_t s); , piece_state_t s);
void mark_as_writing(piece_block block, void* peer); void mark_as_writing(piece_block block, void* peer);
void mark_as_finished(piece_block block, void* peer); void mark_as_finished(piece_block block, void* peer);
void write_failed(piece_block block); void write_failed(piece_block block);
int num_peers(piece_block block) const; int num_peers(piece_block block) const;
ptime last_request(int piece) const;
// returns information about the given piece // returns information about the given piece
void piece_info(int index, piece_picker::downloading_piece& st) const; void piece_info(int index, piece_picker::downloading_piece& st) const;
// if a piece had a hash-failure, it must be restored and // if a piece had a hash-failure, it must be restored and
// made available for redownloading // made available for redownloading
void restore_piece(int index); void restore_piece(int index);
// clears the given piece's download flag // clears the given piece's download flag
// this means that this piece-block can be picked again // this means that this piece-block can be picked again
 End of changes. 4 change blocks. 
1 lines changed or deleted 4 lines changed or added


 session_impl.hpp   session_impl.hpp 
skipping to change at line 187 skipping to change at line 187
#ifndef TORRENT_DISABLE_DHT #ifndef TORRENT_DISABLE_DHT
void add_dht_node(std::pair<std::string, int> const& node); void add_dht_node(std::pair<std::string, int> const& node);
void add_dht_node(udp::endpoint n); void add_dht_node(udp::endpoint n);
void add_dht_router(std::pair<std::string, int> cons t& node); void add_dht_router(std::pair<std::string, int> cons t& node);
void set_dht_settings(dht_settings const& s); void set_dht_settings(dht_settings const& s);
dht_settings const& get_dht_settings() const { retur n m_dht_settings; } dht_settings const& get_dht_settings() const { retur n m_dht_settings; }
void start_dht(entry const& startup_state); void start_dht(entry const& startup_state);
void stop_dht(); void stop_dht();
entry dht_state() const; entry dht_state() const;
void on_dht_router_name_lookup(error_code const& e
, tcp::resolver::iterator host);
#endif #endif
#ifndef TORRENT_DISABLE_ENCRYPTION #ifndef TORRENT_DISABLE_ENCRYPTION
void set_pe_settings(pe_settings const& settings); void set_pe_settings(pe_settings const& settings);
pe_settings const& get_pe_settings() const { return m_pe_settings; } pe_settings const& get_pe_settings() const { return m_pe_settings; }
#endif #endif
// called when a port mapping is successful, or a ro uter returns // called when a port mapping is successful, or a ro uter returns
// a failure to map a port // a failure to map a port
void on_port_mapping(int mapping, int port, std::str ing const& errmsg void on_port_mapping(int mapping, int port, std::str ing const& errmsg
skipping to change at line 359 skipping to change at line 361
// file pool must be destructed after the torrents // file pool must be destructed after the torrents
// since they will still have references to it // since they will still have references to it
// when they are destructed. // when they are destructed.
file_pool m_files; file_pool m_files;
// this is where all active sockets are stored. // this is where all active sockets are stored.
// the selector can sleep while there's no activity on // the selector can sleep while there's no activity on
// them // them
mutable io_service m_io_service; mutable io_service m_io_service;
tcp::resolver m_host_resolver;
// handles disk io requests asynchronously // handles disk io requests asynchronously
// peers have pointers into the disk buffer // peers have pointers into the disk buffer
// pool, and must be destructed before this // pool, and must be destructed before this
// object. The disk thread relies on the file // object. The disk thread relies on the file
// pool object, and must be destructed before // pool object, and must be destructed before
// m_files. The disk io thread posts completion // m_files. The disk io thread posts completion
// events to the io service, and needs to be // events to the io service, and needs to be
// constructed after it. // constructed after it.
disk_io_thread m_disk_thread; disk_io_thread m_disk_thread;
skipping to change at line 544 skipping to change at line 548
bool m_dht_same_port; bool m_dht_same_port;
// see m_external_listen_port. This is the same // see m_external_listen_port. This is the same
// but for the udp port used by the DHT. // but for the udp port used by the DHT.
int m_external_udp_port; int m_external_udp_port;
udp_socket m_dht_socket; udp_socket m_dht_socket;
// these are used when starting the DHT // these are used when starting the DHT
// (and bootstrapping it), and then erased // (and bootstrapping it), and then erased
std::list<std::pair<std::string, int> > m_dht_router _nodes; std::list<udp::endpoint> m_dht_router_nodes;
void on_receive_udp(error_code const& e void on_receive_udp(error_code const& e
, udp::endpoint const& ep, char const* buf, int len); , udp::endpoint const& ep, char const* buf, int len);
#endif #endif
#ifndef TORRENT_DISABLE_ENCRYPTION #ifndef TORRENT_DISABLE_ENCRYPTION
pe_settings m_pe_settings; pe_settings m_pe_settings;
#endif #endif
boost::intrusive_ptr<natpmp> m_natpmp; boost::intrusive_ptr<natpmp> m_natpmp;
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 lines changed or added


 tracker_manager.hpp   tracker_manager.hpp 
skipping to change at line 105 skipping to change at line 105
completed, completed,
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;
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;
}; };
struct TORRENT_EXPORT request_callback struct TORRENT_EXPORT request_callback
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 udp_socket.hpp   udp_socket.hpp 
skipping to change at line 37 skipping to change at line 37
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
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_UDP_SOCKET_HPP_INCLUDED #ifndef TORRENT_UDP_SOCKET_HPP_INCLUDED
#define TORRENT_UDP_SOCKET_HPP_INCLUDED #define TORRENT_UDP_SOCKET_HPP_INCLUDED
#include "libtorrent/socket.hpp" #include "libtorrent/socket.hpp"
#include "libtorrent/buffer.hpp"
#include "libtorrent/session_settings.hpp" #include "libtorrent/session_settings.hpp"
#include <vector> #include <vector>
#include <boost/function.hpp> #include <boost/function.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
namespace libtorrent namespace libtorrent
{ {
class connection_queue; class connection_queue;
skipping to change at line 68 skipping to change at line 69
void send(udp::endpoint const& ep, char const* p, int len, e rror_code& ec); void send(udp::endpoint const& ep, char const* p, int len, e rror_code& ec);
void bind(udp::endpoint const& ep, error_code& ec); void bind(udp::endpoint const& ep, error_code& ec);
void bind(int port); void bind(int port);
void close(); void close();
int local_port() const { return m_bind_port; } int local_port() const { return m_bind_port; }
void set_proxy_settings(proxy_settings const& ps); void set_proxy_settings(proxy_settings const& ps);
proxy_settings const& get_proxy_settings() { return m_proxy_ settings; } proxy_settings const& get_proxy_settings() { return m_proxy_ settings; }
protected:
struct queued_packet
{
udp::endpoint ep;
buffer buf;
};
private: private:
callback_t m_callback; callback_t m_callback;
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);
void handshake1(error_code const& e); void handshake1(error_code const& e);
void handshake2(error_code const& e); void handshake2(error_code const& e);
void handshake3(error_code const& e); void handshake3(error_code const& e);
void handshake4(error_code const& e); void handshake4(error_code const& e);
void socks_forward_udp(); void socks_forward_udp(mutex_t::scoped_lock& l);
void connect1(error_code const& e); void connect1(error_code const& e);
void connect2(error_code const& e); void connect2(error_code const& e);
void wrap(udp::endpoint const& ep, char const* p, int len, e rror_code& ec); void wrap(udp::endpoint const& ep, char const* p, int len, e rror_code& ec);
void unwrap(error_code const& e, char const* buf, int size); void unwrap(error_code const& e, char const* buf, int size);
typedef boost::mutex mutex_t;
mutable mutex_t m_mutex; mutable mutex_t m_mutex;
udp::socket m_ipv4_sock; udp::socket m_ipv4_sock;
udp::socket m_ipv6_sock; udp::socket m_ipv6_sock;
udp::endpoint m_v4_ep; udp::endpoint m_v4_ep;
udp::endpoint m_v6_ep; udp::endpoint m_v6_ep;
char m_v4_buf[1600]; char m_v4_buf[1600];
char m_v6_buf[1600]; char m_v6_buf[1600];
int m_bind_port; int m_bind_port;
char m_outstanding; char m_outstanding;
tcp::socket m_socks5_sock; tcp::socket m_socks5_sock;
int m_connection_ticket; int m_connection_ticket;
proxy_settings m_proxy_settings; proxy_settings m_proxy_settings;
connection_queue& m_cc; connection_queue& m_cc;
tcp::resolver m_resolver; tcp::resolver m_resolver;
char m_tmp_buf[100]; char m_tmp_buf[100];
bool m_queue_packets;
bool m_tunnel_packets; bool m_tunnel_packets;
bool m_abort; bool m_abort;
udp::endpoint m_proxy_addr; udp::endpoint m_proxy_addr;
// while we're connecting to the proxy
// we have to queue the packets, we'll flush
// them once we're connected
std::list<queued_packet> m_queue;
#ifdef TORRENT_DEBUG #ifdef TORRENT_DEBUG
bool m_started; bool m_started;
int m_magic; int m_magic;
#endif #endif
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
2 lines changed or deleted 17 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 14 #define LIBTORRENT_VERSION_MINOR 14
#define LIBTORRENT_VERSION_TINY 8 #define LIBTORRENT_VERSION_TINY 9
#define LIBTORRENT_VERSION "0.14.8.0" #define LIBTORRENT_VERSION "0.14.9.0"
#define LIBTORRENT_REVISION "$Rev: 4143 $" #define LIBTORRENT_REVISION "$Rev: 4192 $"
#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);
std::string const& url() const { return m_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() {}
void write_not_interested() {} void write_not_interested() {}
skipping to change at line 158 skipping to change at line 158
// (might be more than the bt requests) // (might be more than the bt requests)
std::deque<int> m_file_requests; std::deque<int> m_file_requests;
std::string m_server_string; std::string m_server_string;
http_parser m_parser; http_parser m_parser;
std::string m_auth; std::string m_auth;
std::string m_host; std::string m_host;
int m_port; int m_port;
std::string m_path; std::string m_path;
std::string m_url; std::string m_url;
const std::string m_original_url;
// the first request will contain a little bit more data // the first request will contain a little bit more data
// than subsequent ones, things that aren't critical are lef t // than subsequent ones, things that aren't critical are lef t
// out to save bandwidth. // out to save bandwidth.
bool m_first_request; bool m_first_request;
// this is used for intermediate storage of pieces // this is used for intermediate storage of pieces
// that is received in more than on HTTP responses // that is received in more than on HTTP responses
std::vector<char> m_piece; std::vector<char> m_piece;
// the mapping of the data in the m_piece buffer // the mapping of the data in the m_piece buffer
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 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/