config.hpp   config.hpp 
skipping to change at line 129 skipping to change at line 129
|| defined __OpenBSD__ || defined __bsdi__ || defined __DragonFly__ \ || defined __OpenBSD__ || defined __bsdi__ || defined __DragonFly__ \
|| defined __FreeBSD_kernel__ || defined __FreeBSD_kernel__
#define TORRENT_BSD #define TORRENT_BSD
#define TORRENT_HAS_FALLOCATE 0 #define TORRENT_HAS_FALLOCATE 0
#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 #define TORRENT_WINDOWS
#define TORRENT_HAS_FALLOCATE 0 #define TORRENT_HAS_FALLOCATE 0
#define TORRENT_ICONV_ARG (const char**)
#elif defined WIN32 #elif defined WIN32
#define TORRENT_WINDOWS #define TORRENT_WINDOWS
#define TORRENT_HAS_FALLOCATE 0 #define TORRENT_HAS_FALLOCATE 0
#elif defined sun || defined __sun #elif defined sun || defined __sun
#define TORRENT_SOLARIS #define TORRENT_SOLARIS
#define TORRENT_COMPLETE_TYPES_REQUIRED 1 #define TORRENT_COMPLETE_TYPES_REQUIRED 1
#else #else
#warning unknown OS, assuming BSD #warning unknown OS, assuming BSD
#define TORRENT_BSD #define TORRENT_BSD
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 dht_tracker.hpp   dht_tracker.hpp 
skipping to change at line 115 skipping to change at line 115
{ return boost::intrusive_ptr<dht_tracker>(this); } { return boost::intrusive_ptr<dht_tracker>(this); }
void on_name_lookup(error_code const& e void on_name_lookup(error_code const& e
, udp::resolver::iterator host); , udp::resolver::iterator host);
void on_router_name_lookup(error_code const& e void on_router_name_lookup(error_code const& e
, udp::resolver::iterator host); , udp::resolver::iterator host);
void connection_timeout(error_code const& e); void connection_timeout(error_code const& e);
void refresh_timeout(error_code const& e); void refresh_timeout(error_code const& e);
void tick(error_code const& e); void tick(error_code const& e);
void on_bootstrap();
void send_packet(msg const& m); void send_packet(msg const& m);
void incoming_error(char const* msg, lazy_entry const& e, ud p::endpoint const& ep); void incoming_error(char const* msg, lazy_entry const& e, ud p::endpoint const& ep);
node_impl m_dht; node_impl m_dht;
libtorrent::aux::session_impl& m_ses; libtorrent::aux::session_impl& m_ses;
rate_limited_udp_socket& m_sock; rate_limited_udp_socket& m_sock;
std::vector<char> m_send_buf; std::vector<char> m_send_buf;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 escape_string.hpp   escape_string.hpp 
skipping to change at line 75 skipping to change at line 75
// encodes a string using the base64 scheme // encodes a string using the base64 scheme
TORRENT_EXPORT std::string base64encode(std::string const& s); TORRENT_EXPORT std::string base64encode(std::string const& s);
// encodes a string using the base32 scheme // encodes a string using the base32 scheme
TORRENT_EXPORT std::string base32encode(std::string const& s); TORRENT_EXPORT std::string base32encode(std::string const& s);
TORRENT_EXPORT std::string base32decode(std::string const& s); TORRENT_EXPORT std::string base32decode(std::string const& s);
TORRENT_EXPORT boost::optional<std::string> url_has_argument( TORRENT_EXPORT boost::optional<std::string> url_has_argument(
std::string const& url, std::string argument, size_t* out_po s = 0); std::string const& url, std::string argument, size_t* out_po s = 0);
// replaces \ with /
TORRENT_EXPORT void convert_path_to_posix(std::string& path);
TORRENT_EXPORT std::string read_until(char const*& str, char delim, char const* end); TORRENT_EXPORT std::string read_until(char const*& str, char delim, char const* end);
TORRENT_EXPORT std::string to_hex(std::string const& s); TORRENT_EXPORT std::string to_hex(std::string const& s);
TORRENT_EXPORT bool is_hex(char const *in, int len); TORRENT_EXPORT bool is_hex(char const *in, int len);
TORRENT_EXPORT void to_hex(char const *in, int len, char* out); TORRENT_EXPORT void to_hex(char const *in, int len, char* out);
TORRENT_EXPORT bool from_hex(char const *in, int len, char* out); TORRENT_EXPORT bool from_hex(char const *in, int len, char* out);
#if TORRENT_USE_WPATH #if TORRENT_USE_WPATH
TORRENT_EXPORT std::wstring convert_to_wstring(std::string const& s) ; TORRENT_EXPORT std::wstring convert_to_wstring(std::string const& s) ;
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 file.hpp   file.hpp 
skipping to change at line 103 skipping to change at line 103
// pos_alignment() and buffer addresses // pos_alignment() and buffer addresses
// to buf_alignment() and read/write sizes // to buf_alignment() and read/write sizes
// to size_alignment() // to size_alignment()
read_only = 0, read_only = 0,
write_only = 1, write_only = 1,
read_write = 2, read_write = 2,
rw_mask = read_only | write_only | read_write, rw_mask = read_only | write_only | read_write,
no_buffer = 4, no_buffer = 4,
mode_mask = rw_mask | no_buffer, mode_mask = rw_mask | no_buffer,
sparse = 8, sparse = 8,
random_access = 32,
attribute_hidden = 0x1000, attribute_hidden = 0x1000,
attribute_executable = 0x2000, attribute_executable = 0x2000,
attribute_mask = attribute_hidden | attribute_execut able attribute_mask = attribute_hidden | attribute_execut able
}; };
#ifdef TORRENT_WINDOWS #ifdef TORRENT_WINDOWS
struct iovec_t struct iovec_t
{ {
void* iov_base; void* iov_base;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 session_impl.hpp   session_impl.hpp 
skipping to change at line 721 skipping to change at line 721
#endif #endif
#if defined TORRENT_STATS #if defined TORRENT_STATS
// logger used to write bandwidth usage statistics // logger used to write bandwidth usage statistics
std::ofstream m_stats_logger; std::ofstream m_stats_logger;
int m_second_counter; int m_second_counter;
// used to log send buffer usage statistics // used to log send buffer usage statistics
std::ofstream m_buffer_usage_logger; std::ofstream m_buffer_usage_logger;
// the number of send buffers that are allocated // the number of send buffers that are allocated
int m_buffer_allocations; int m_buffer_allocations;
enum
{
on_read_counter,
on_write_counter,
on_tick_counter,
on_lsd_counter,
on_lsd_peer_counter,
on_udp_counter,
on_accept_counter,
on_disk_queue_counter,
on_disk_read_counter,
on_disk_write_counter,
max_messages
};
int m_num_messages[max_messages];
// 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8
192,
// 16384, 32768, 65536, 131072, 262144, 524288, 1048
576
int m_send_buffer_sizes[18];
int m_recv_buffer_sizes[18];
#endif #endif
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined T ORRENT_ERROR_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined T ORRENT_ERROR_LOGGING
boost::shared_ptr<logger> create_log(std::string con st& name boost::shared_ptr<logger> create_log(std::string con st& name
, int instance, bool append = true); , int instance, bool append = true);
// this list of tracker loggers serves as tracker_ca llbacks when // this list of tracker loggers serves as tracker_ca llbacks when
// shutting down. This list is just here to keep the m alive during // shutting down. This list is just here to keep the m alive during
// whe shutting down process // whe shutting down process
std::list<boost::shared_ptr<tracker_logger> > m_trac ker_loggers; std::list<boost::shared_ptr<tracker_logger> > m_trac ker_loggers;
 End of changes. 1 change blocks. 
0 lines changed or deleted 22 lines changed or added


 socket.hpp   socket.hpp 
skipping to change at line 260 skipping to change at line 260
template<class Protocol> template<class Protocol>
int const* data(Protocol const&) const { return &m_value; } int const* data(Protocol const&) const { return &m_value; }
template<class Protocol> template<class Protocol>
size_t size(Protocol const&) const { return sizeof(m_value); } size_t size(Protocol const&) const { return sizeof(m_value); }
int m_value; int m_value;
}; };
#endif #endif
struct type_of_service struct type_of_service
{ {
#ifdef WIN32
typedef DWORD tos_t;
#else
typedef int tos_t;
#endif
type_of_service(char val): m_value(val) {} type_of_service(char val): m_value(val) {}
template<class Protocol> template<class Protocol>
int level(Protocol const&) const { return IPPROTO_IP; } int level(Protocol const&) const { return IPPROTO_IP; }
template<class Protocol> template<class Protocol>
int name(Protocol const&) const { return IP_TOS; } int name(Protocol const&) const { return IP_TOS; }
template<class Protocol> template<class Protocol>
char const* data(Protocol const&) const { return &m_value; } tos_t const* data(Protocol const&) const { return &m_value; }
template<class Protocol> template<class Protocol>
size_t size(Protocol const&) const { return sizeof(m_value); } size_t size(Protocol const&) const { return sizeof(m_value); }
char m_value; tos_t m_value;
}; };
} }
#endif // TORRENT_SOCKET_HPP_INCLUDED #endif // TORRENT_SOCKET_HPP_INCLUDED
 End of changes. 3 change blocks. 
2 lines changed or deleted 7 lines changed or added


 udp_socket.hpp   udp_socket.hpp 
skipping to change at line 120 skipping to change at line 120
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);
bool maybe_clear_callback(mutex_t::scoped_lock& l); bool maybe_clear_callback(mutex_t::scoped_lock& l);
mutable mutex_t m_mutex; mutable mutex_t m_mutex;
udp::socket m_ipv4_sock; udp::socket m_ipv4_sock;
udp::endpoint m_v4_ep; udp::endpoint m_v4_ep;
char m_v4_buf[1600]; char m_v4_buf[2000];
#if TORRENT_USE_IPV6 #if TORRENT_USE_IPV6
udp::socket m_ipv6_sock; udp::socket m_ipv6_sock;
udp::endpoint m_v6_ep; udp::endpoint m_v6_ep;
char m_v6_buf[1600]; char m_v6_buf[2000];
#endif #endif
boost::uint16_t m_bind_port; boost::uint16_t m_bind_port;
boost::uint8_t m_v4_outstanding; boost::uint8_t m_v4_outstanding;
#if TORRENT_USE_IPV6 #if TORRENT_USE_IPV6
boost::uint8_t m_v6_outstanding; boost::uint8_t m_v6_outstanding;
#endif #endif
tcp::socket m_socks5_sock; tcp::socket m_socks5_sock;
int m_connection_ticket; int m_connection_ticket;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 variant_stream.hpp   variant_stream.hpp 
skipping to change at line 494 skipping to change at line 494
IOService& operator()(T* p) const IOService& operator()(T* p) const
{ {
return p->get_io_service(); return p->get_io_service();
} }
IOService& operator()(boost::blank) const IOService& operator()(boost::blank) const
{ {
return *(IOService*)0; return *(IOService*)0;
} }
}; };
// -------------- lowest_layer -----------
template <class LowestLayer>
struct lowest_layer_visitor
: boost::static_visitor<LowestLayer&>
{
template <class T>
LowestLayer& operator()(T* p) const
{
return p->lowest_layer();
}
LowestLayer& operator()(boost::blank) const
{
return *(LowestLayer*)0;
}
};
} // namespace aux } // namespace aux
template < template <
BOOST_PP_ENUM_BINARY_PARAMS( BOOST_PP_ENUM_BINARY_PARAMS(
NETWORK_VARIANT_STREAM_LIMIT, class S, = boost::mpl::void_ BOOST_PP _INTERCEPT NETWORK_VARIANT_STREAM_LIMIT, class S, = boost::mpl::void_ BOOST_PP _INTERCEPT
) )
> >
class variant_stream : boost::noncopyable class variant_stream : boost::noncopyable
{ {
public: public:
skipping to change at line 539 skipping to change at line 520
typedef typename boost::make_variant_over< typedef typename boost::make_variant_over<
typename boost::mpl::push_back< typename boost::mpl::push_back<
typename boost::mpl::transform< typename boost::mpl::transform<
types types
, boost::add_pointer<boost::mpl::_> , boost::add_pointer<boost::mpl::_>
>::type >::type
, boost::blank , boost::blank
>::type >::type
>::type variant_type; >::type variant_type;
typedef typename S0::lowest_layer_type lowest_layer_type; typedef variant_stream lowest_layer_type;
typedef typename S0::endpoint_type endpoint_type; typedef typename S0::endpoint_type endpoint_type;
typedef typename S0::protocol_type protocol_type; typedef typename S0::protocol_type protocol_type;
explicit variant_stream(io_service& ios) explicit variant_stream(io_service& ios)
: m_io_service(ios), m_variant(boost::blank()) {} : m_io_service(ios), m_variant(boost::blank()) {}
template <class S> template <class S>
void instantiate(io_service& ios) void instantiate(io_service& ios)
{ {
TORRENT_ASSERT(&ios == &m_io_service); TORRENT_ASSERT(&ios == &m_io_service);
skipping to change at line 772 skipping to change at line 753
); );
} }
io_service& get_io_service() io_service& get_io_service()
{ {
return m_io_service; return m_io_service;
} }
lowest_layer_type& lowest_layer() lowest_layer_type& lowest_layer()
{ {
// this is called by the ssl_socket to get the io_service, which return *this;
// is ok even when it's not instantiated
// TORRENT_ASSERT(instantiated());
return boost::apply_visitor(
aux::lowest_layer_visitor<lowest_layer_type>(), m_variant
);
} }
private: private:
io_service& m_io_service; io_service& m_io_service;
variant_type m_variant; variant_type m_variant;
}; };
} // namespace libtorrent } // namespace libtorrent
#endif // VARIANT_STREAM_070211_HPP #endif // VARIANT_STREAM_070211_HPP
 End of changes. 3 change blocks. 
26 lines changed or deleted 2 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 8 #define LIBTORRENT_VERSION_TINY 10
#define LIBTORRENT_VERSION "0.15.8.0" #define LIBTORRENT_VERSION "0.15.10.0"
#define LIBTORRENT_REVISION "$Rev: 6001 $" #define LIBTORRENT_REVISION "$Rev: 6415 $"
#endif #endif
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 xml_parse.hpp   xml_parse.hpp 
skipping to change at line 66 skipping to change at line 66
template <class CallbackType> template <class CallbackType>
void xml_parse(char* p, char* end, CallbackType callback) void xml_parse(char* p, char* end, CallbackType callback)
{ {
for(;p != end; ++p) for(;p != end; ++p)
{ {
char const* start = p; char const* start = p;
char const* val_start = 0; char const* val_start = 0;
int token; int token;
// look for tag start // look for tag start
for(; *p != '<' && p != end; ++p); for(; p != end && *p != '<'; ++p);
if (p != start) if (p != start)
{ {
if (p != end) if (p != end)
{ {
TORRENT_ASSERT(*p == '<'); TORRENT_ASSERT(*p == '<');
*p = 0; *p = 0;
} }
token = xml_string; token = xml_string;
callback(token, start, val_start); callback(token, start, val_start);
if (p != end) *p = '<'; if (p != end) *p = '<';
} }
if (p == end) break; if (p == end) break;
// skip '<' // skip '<'
++p; ++p;
// parse the name of the tag. // parse the name of the tag.
for (start = p; p != end && *p != '>' && !isspace(*p ); ++p); for (start = p; p != end && *p != '>' && !is_space(* p); ++p);
char* tag_name_end = p; char* tag_name_end = p;
// skip the attributes for now // skip the attributes for now
for (; p != end && *p != '>'; ++p); for (; p != end && *p != '>'; ++p);
// parse error // parse error
if (p == end) if (p == end)
{ {
token = xml_parse_error; token = xml_parse_error;
skipping to change at line 153 skipping to change at line 153
token = xml_start_tag; token = xml_start_tag;
callback(token, start, val_start); callback(token, start, val_start);
} }
*tag_name_end = save; *tag_name_end = save;
// parse attributes // parse attributes
for (char* i = tag_name_end; i < tag_end; ++i) for (char* i = tag_name_end; i < tag_end; ++i)
{ {
// find start of attribute name // find start of attribute name
for (; i != tag_end && isspace(*i); ++i); for (; i != tag_end && is_space(*i); ++i);
if (i == tag_end) break; if (i == tag_end) break;
start = i; start = i;
// find end of attribute name // find end of attribute name
for (; i != tag_end && *i != '=' && !isspace (*i); ++i); for (; i != tag_end && *i != '=' && !is_spac e(*i); ++i);
char* name_end = i; char* name_end = i;
// look for equality sign // look for equality sign
for (; i != tag_end && *i != '='; ++i); for (; i != tag_end && *i != '='; ++i);
if (i == tag_end) if (i == tag_end)
{ {
token = xml_parse_error; token = xml_parse_error;
val_start = 0; val_start = 0;
start = "garbage inside element brac kets"; start = "garbage inside element brac kets";
callback(token, start, val_start); callback(token, start, val_start);
break; break;
} }
++i; ++i;
for (; i != tag_end && isspace(*i); ++i); for (; i != tag_end && is_space(*i); ++i);
// check for parse error (values must be quo ted) // check for parse error (values must be quo ted)
if (i == tag_end || (*i != '\'' && *i != '\" ')) if (i == tag_end || (*i != '\'' && *i != '\" '))
{ {
token = xml_parse_error; token = xml_parse_error;
val_start = 0; val_start = 0;
start = "unquoted attribute value"; start = "unquoted attribute value";
callback(token, start, val_start); callback(token, start, val_start);
break; break;
} }
char quote = *i; char quote = *i;
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 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/