alert.hpp   alert.hpp 
skipping to change at line 150 skipping to change at line 150
template <class T> template <class T>
bool should_post() const bool should_post() const
{ {
boost::mutex::scoped_lock lock(m_mutex); boost::mutex::scoped_lock lock(m_mutex);
if (m_alerts.size() >= m_queue_size_limit) return fa lse; if (m_alerts.size() >= m_queue_size_limit) return fa lse;
return (m_alert_mask & T::static_category) != 0; return (m_alert_mask & T::static_category) != 0;
} }
alert const* wait_for_alert(time_duration max_wait); alert const* wait_for_alert(time_duration max_wait);
void set_alert_mask(int m) void set_alert_mask(boost::uint32_t m)
{ {
boost::mutex::scoped_lock lock(m_mutex); boost::mutex::scoped_lock lock(m_mutex);
m_alert_mask = m; m_alert_mask = m;
} }
size_t alert_queue_size_limit() const { return m_queue_size_ limit; } size_t alert_queue_size_limit() const { return m_queue_size_ limit; }
size_t set_alert_queue_size_limit(size_t queue_size_limit_); size_t set_alert_queue_size_limit(size_t queue_size_limit_);
void set_dispatch_function(boost::function<void(alert const& )> const&); void set_dispatch_function(boost::function<void(alert const& )> const&);
private: private:
std::queue<alert*> m_alerts; std::queue<alert*> m_alerts;
mutable boost::mutex m_mutex; mutable boost::mutex m_mutex;
boost::condition m_condition; boost::condition m_condition;
int m_alert_mask; boost::uint32_t m_alert_mask;
size_t m_queue_size_limit; size_t m_queue_size_limit;
boost::function<void(alert const&)> m_dispatch; boost::function<void(alert const&)> m_dispatch;
io_service& m_ios; io_service& m_ios;
}; };
struct TORRENT_EXPORT unhandled_alert : std::exception struct TORRENT_EXPORT unhandled_alert : std::exception
{ {
unhandled_alert() {} unhandled_alert() {}
}; };
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 bitfield.hpp   bitfield.hpp 
skipping to change at line 241 skipping to change at line 241
m_own = true; m_own = true;
} }
else if (bits > m_size) else if (bits > m_size)
{ {
unsigned char* tmp = (unsigned char* )std::malloc(b); unsigned char* tmp = (unsigned char* )std::malloc(b);
std::memcpy(tmp, m_bytes, (std::min) (int(m_size + 7)/ 8, b)); std::memcpy(tmp, m_bytes, (std::min) (int(m_size + 7)/ 8, b));
m_bytes = tmp; m_bytes = tmp;
m_own = true; m_own = true;
} }
} }
else else if (bits > 0)
{ {
m_bytes = (unsigned char*)std::malloc(b); m_bytes = (unsigned char*)std::malloc(b);
m_own = true; m_own = true;
} }
m_size = bits; m_size = bits;
clear_trailing_bits(); clear_trailing_bits();
} }
void free() { dealloc(); m_size = 0; } void free() { dealloc(); m_size = 0; }
 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 46 skipping to change at line 46
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/version.hpp> #include <boost/version.hpp>
#include <stdio.h> // for snprintf #include <stdio.h> // for snprintf
#ifndef WIN32 #ifndef WIN32
#define __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS
#include <inttypes.h> #include <inttypes.h>
#endif #endif
#ifndef PRId64 #ifndef PRId64
#ifdef _WIN32 // MinGW uses microsofts runtime
#if defined _MSC_VER || defined __MINGW32__
#define PRId64 "I64d" #define PRId64 "I64d"
#else #else
#define PRId64 "lld" #define PRId64 "lld"
#endif #endif
#endif #endif
// ======= GCC ========= // ======= GCC =========
#if defined __GNUC__ #if defined __GNUC__
skipping to change at line 127 skipping to change at line 128
|| 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
skipping to change at line 219 skipping to change at line 221
#endif #endif
#if !defined(TORRENT_READ_HANDLER_MAX_SIZE) #if !defined(TORRENT_READ_HANDLER_MAX_SIZE)
# define TORRENT_READ_HANDLER_MAX_SIZE 256 # define TORRENT_READ_HANDLER_MAX_SIZE 256
#endif #endif
#if !defined(TORRENT_WRITE_HANDLER_MAX_SIZE) #if !defined(TORRENT_WRITE_HANDLER_MAX_SIZE)
# define TORRENT_WRITE_HANDLER_MAX_SIZE 256 # define TORRENT_WRITE_HANDLER_MAX_SIZE 256
#endif #endif
#ifndef TORRENT_ICONV_ARG
#define TORRENT_ICONV_ARG (char**)
#endif
#if defined _MSC_VER && _MSC_VER <= 1200 #if defined _MSC_VER && _MSC_VER <= 1200
#define for if (false) {} else for #define for if (false) {} else for
#endif #endif
// determine what timer implementation we can use // determine what timer implementation we can use
#if defined(__MACH__) #if defined(__MACH__)
#define TORRENT_USE_ABSOLUTE_TIME 1 #define TORRENT_USE_ABSOLUTE_TIME 1
#elif defined(_WIN32) #elif defined(_WIN32)
#define TORRENT_USE_QUERY_PERFORMANCE_TIMER 1 #define TORRENT_USE_QUERY_PERFORMANCE_TIMER 1
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added


 connection_queue.hpp   connection_queue.hpp 
skipping to change at line 84 skipping to change at line 84
typedef boost::mutex mutex_t; typedef boost::mutex mutex_t;
void try_connect(mutex_t::scoped_lock& l); void try_connect(mutex_t::scoped_lock& l);
void on_timeout(error_code const& e); void on_timeout(error_code const& e);
void on_try_connect(); void on_try_connect();
struct entry struct entry
{ {
entry(): connecting(false), ticket(0), expires(max_time()), priority(0) {} entry(): connecting(false), ticket(0), expires(max_time()), priority(0) {}
// called when the connection is initiated // called when the connection is initiated
// this is when the timeout countdown starts
boost::function<void(int)> on_connect; boost::function<void(int)> on_connect;
// called if done hasn't been called within the timeout // called if done hasn't been called within the timeout
// or if the connection queue aborts. This means there
// are 3 different interleaves of these function calls:
// 1. on_connect
// 2. on_connect, on_timeout
// 3. on_timeout
boost::function<void()> on_timeout; boost::function<void()> on_timeout;
bool connecting; bool connecting;
int ticket; int ticket;
ptime expires; ptime expires;
time_duration timeout; time_duration timeout;
int priority; int priority;
}; };
std::list<entry> m_queue; std::list<entry> m_queue;
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added


 create_torrent.hpp   create_torrent.hpp 
skipping to change at line 102 skipping to change at line 102
void add_http_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; }
std::vector<sha1_hash> const& merkle_tree() const { return m
_merkle_tree; }
private: private:
file_storage& m_files; file_storage& m_files;
// if m_info_dict is initialized, it is // if m_info_dict is initialized, it is
// used instead of m_files to generate // used instead of m_files to generate
// the info dictionary // the info dictionary
entry m_info_dict; entry m_info_dict;
// the urls to the trackers // the urls to the trackers
typedef std::pair<std::string, int> announce_entry; typedef std::pair<std::string, int> announce_entry;
std::vector<announce_entry> m_urls; std::vector<announce_entry> m_urls;
std::vector<std::string> m_url_seeds; std::vector<std::string> m_url_seeds;
std::vector<sha1_hash> m_piece_hash; std::vector<sha1_hash> m_piece_hash;
// if we're generating a merkle torrent, this is the
// merkle tree we got. This should be saved in fast-resume
// in order to start seeding the torrent
mutable std::vector<sha1_hash> m_merkle_tree;
// dht nodes to add to the routing table/bootstrap from // dht nodes to add to the routing table/bootstrap from
typedef std::vector<std::pair<std::string, int> > nodes_t; typedef std::vector<std::pair<std::string, int> > nodes_t;
nodes_t m_nodes; nodes_t m_nodes;
// the hash that identifies this torrent // the hash that identifies this torrent
// is mutable because it's calculated // is mutable because it's calculated
// lazily // lazily
mutable sha1_hash m_info_hash; mutable sha1_hash m_info_hash;
// if a creation date is found in the torrent file // if a creation date is found in the torrent file
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added


 session.hpp   session.hpp 
skipping to change at line 449 skipping to change at line 449
void set_max_connections(int limit); void set_max_connections(int limit);
void set_max_half_open_connections(int limit); void set_max_half_open_connections(int limit);
int max_connections() const; int max_connections() const;
int max_uploads() const; int max_uploads() const;
std::auto_ptr<alert> pop_alert(); std::auto_ptr<alert> pop_alert();
#ifndef TORRENT_NO_DEPRECATE #ifndef TORRENT_NO_DEPRECATE
TORRENT_DEPRECATED_PREFIX TORRENT_DEPRECATED_PREFIX
void set_severity_level(alert::severity_t s) TORRENT_DEPRECA TED; void set_severity_level(alert::severity_t s) TORRENT_DEPRECA TED;
TORRENT_DEPRECATED_PREFIX
void set_alert_mask(int m) TORRENT_DEPRECATED;
#endif #endif
void set_alert_mask(int m); void set_alert_mask(boost::uint32_t m);
size_t set_alert_queue_size_limit(size_t queue_size_limit_); size_t set_alert_queue_size_limit(size_t queue_size_limit_);
alert const* wait_for_alert(time_duration max_wait); alert const* wait_for_alert(time_duration max_wait);
void set_alert_dispatch(boost::function<void(alert const&)> const& fun); void set_alert_dispatch(boost::function<void(alert const&)> const& fun);
connection_queue& get_connection_queue(); connection_queue& get_connection_queue();
// starts/stops UPnP, NATPMP or LSD port mappers // starts/stops UPnP, NATPMP or LSD port mappers
// they are stopped by default // they are stopped by default
void start_lsd(); void start_lsd();
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 session_impl.hpp   session_impl.hpp 
skipping to change at line 247 skipping to change at line 247
torrent_handle add_torrent(add_torrent_params const& , error_code& ec); torrent_handle add_torrent(add_torrent_params const& , error_code& ec);
void remove_torrent(torrent_handle const& h, int opt ions); void remove_torrent(torrent_handle const& h, int opt ions);
std::vector<torrent_handle> get_torrents(); std::vector<torrent_handle> get_torrents();
void queue_check_torrent(boost::shared_ptr<torrent> const& t); void queue_check_torrent(boost::shared_ptr<torrent> const& t);
void dequeue_check_torrent(boost::shared_ptr<torrent > const& t); void dequeue_check_torrent(boost::shared_ptr<torrent > const& t);
void set_alert_mask(int m); void set_alert_mask(boost::uint32_t m);
size_t set_alert_queue_size_limit(size_t queue_size_ limit_); size_t set_alert_queue_size_limit(size_t queue_size_ limit_);
std::auto_ptr<alert> pop_alert(); std::auto_ptr<alert> pop_alert();
void set_alert_dispatch(boost::function<void(alert c onst&)> const&); void set_alert_dispatch(boost::function<void(alert c onst&)> const&);
alert const* wait_for_alert(time_duration max_wait); alert const* wait_for_alert(time_duration max_wait);
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;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 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 6 #define LIBTORRENT_VERSION_TINY 7
#define LIBTORRENT_VERSION "0.15.6.0" #define LIBTORRENT_VERSION "0.15.7.0"
#define LIBTORRENT_REVISION "$Rev: 5487 $" #define LIBTORRENT_REVISION "$Rev: 5839 $"
#endif #endif
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 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/