Commit Graph

113 Commits

Author SHA1 Message Date
Jari Sundell 7659cd0ec0 Backport changes from feature-bind. 2019-08-23 23:25:24 +09:00
Jari Sundell 0d5b344d2a Switch to C++11 MRT RNG for random bytes
Switching to a better RNG for generating strings will prevent the common peerID collisions the rTorrent client has been seeing for YEARS in #440 and #318.
2019-06-08 16:22:47 +09:00
chros 13676f06e5 Add median command (See #14) 2017-03-11 11:40:08 +00:00
rakshasa 0df0a6650d Removed ifdef for ipv6. 2014-09-23 18:56:29 +09:00
rakshasa 7007973c76 Added ipv6 patch. 2014-08-14 20:56:20 +09:00
rakshasa 3b39f37f49 C++11 compatibility fixes. 2014-05-13 23:36:37 +09:00
rakshasa a536fc09a0 Updated autoconf scripts. 2014-04-01 11:49:19 +02:00
rakshasa 00a349f68c Added slot_call_list. 2013-08-27 23:18:31 +09:00
rakshasa 78f64a3e08 Use internal_error for priority queue exceptions. 2012-05-31 20:16:26 +09:00
rakshasa 46862e23a9 Added ENODEV to "error_number.h". 2012-04-11 19:24:24 +09:00
Jari Sundell 002833f7b7 Fixed compile issues with C++03. 2011-12-27 17:26:36 +09:00
Jari Sundell 0626dcf783 C++11 fixes. 2011-12-27 16:45:19 +09:00
Jari Sundell 58727fe7fd Fixed compiler issues with gcc-4.6 c++0x. 2011-11-18 17:28:50 +09:00
Jari Sundell 47c03c8717 Updated rak/timer.h. 2011-11-03 03:36:59 +09:00
Jari Sundell e9a065f9d8 Make rtorrent compatible with the latest HEAD. 2011-10-17 13:09:26 +09:00
rakshasa 3e244f9f93 Added <limits> to 'rak/algorithm.h' headers.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1293 e378c898-3ddf-0310-93e7-cc216c733640
2011-10-03 00:39:23 +00:00
rakshasa 0784d6540f * Switched to using '__builtin_popcount' for counting bits in bitfield.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1292 e378c898-3ddf-0310-93e7-cc216c733640
2011-10-02 15:57:22 +00:00
rakshasa f5a141ac5f * Moved bitfields to torrent/utils/download_info.h and made rak/ranges.h part of the API.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1256 e378c898-3ddf-0310-93e7-cc216c733640
2011-07-30 11:40:09 +00:00
rakshasa 5200454cf7 * Added 'execute.*.bg' commands for non-blocking calls. Always returns 0.
* Added support for prioritizing first/last chunk of files matching specified patterns. Default:

  file.prioritize_toc.set=0
  file.prioritize_toc.first.set = {*.avi,*.mp4,*.mkv,*.gz}
  file.prioritize_toc.last.set  = {*.zip}


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1230 e378c898-3ddf-0310-93e7-cc216c733640
2011-05-21 16:04:05 +00:00
rakshasa 6f71a8c1b1 * Added 'p.is_unwanted' and 'p.is_preferred' commands.
* Removed std::tr1:: in favor of std:: using namespace.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1202 e378c898-3ddf-0310-93e7-cc216c733640
2011-04-07 08:41:16 +00:00
rakshasa 7e554e8b1b * Fixed various valgrind warnings.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1189 e378c898-3ddf-0310-93e7-cc216c733640
2010-11-10 11:40:28 +00:00
rakshasa 222bf7ae8f * Better handling of resume after crash/reboot. Sponsored by anonymous source.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1126 e378c898-3ddf-0310-93e7-cc216c733640
2010-02-08 19:41:46 +00:00
rakshasa 8987be3001 * Fixed some minor compiler warnings/errors.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1119 e378c898-3ddf-0310-93e7-cc216c733640
2009-12-26 11:16:21 +00:00
rakshasa 5470e50ffb * Added autoconf support for cacheline_aligned and SMP_CACHE_BYTES.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1115 e378c898-3ddf-0310-93e7-cc216c733640
2009-12-18 21:56:14 +00:00
rakshasa ef6e4deca9 * Foundation for multi-threaded support.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1111 e378c898-3ddf-0310-93e7-cc216c733640
2009-12-12 15:32:04 +00:00
rakshasa 667c4c3562 * Created ThreadBase holding poll manager, etc, and added a this_thread global object.
* Cleaned up main initialization, SCGI and polling code.

* Fixed a bug that would cause reading of a piece to hang if the incoming data contains only data up to the file boundary, but not the next file's data. The bug did not trigger if the file boundary and piece boundaries were the same.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1101 e378c898-3ddf-0310-93e7-cc216c733640
2009-11-12 09:28:35 +00:00
rakshasa de8a11c4fd * Added 'system.method.get', 'ui.current_view.set' and 'group.insert'
commands.

* Enabled different ratio settings for different groups of
downloads.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1079 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-10 18:52:36 +00:00
rakshasa 6385b995f3 * Cleaned up commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1068 e378c898-3ddf-0310-93e7-cc216c733640
2008-09-24 15:26:15 +00:00
rakshasa c627d6dc0c All patches in this commit were from Josef Drexler.
* Fixes a segfault when configure finds execinfo.h.

* Fix compile errors and warnings with g++ 4.3.x.

* Fixes an interoperability issue in the get_peers handling, now it
behaves according to the clarified BEP-0005. Also fixes a minor issue
of not being able to generate error packets.

* Fix a crash in scgi_local or scgi_port when calling freeaddrinfo
with a NULL pointer.

* Only check the filename cache for loading tied torrents (e.g. from
watch dirs) but not manually loaded ones via <enter>/<bs>, to allow
loading those again (ticket #1227).

* Fix display of multi-byte characters with attributes (i.e. utf-8
filenames in the file list), and make the list aware of characters
occupying two screen positions.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1064 e378c898-3ddf-0310-93e7-cc216c733640
2008-08-26 20:42:57 +00:00
rakshasa 03c544d07d * Added some more download commands that replace some of the
start/stop/close wrapper functions in DownloadList.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1049 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-28 16:47:17 +00:00
rakshasa 49bb643cf3 * Added system.time{,_seconds,_usec} commands.
* Cleaned up XMLRPC handling and added support for empty targets so it
will handle print and cat properly.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1039 e378c898-3ddf-0310-93e7-cc216c733640
2008-02-22 14:11:40 +00:00
rakshasa 7b053b969e * Refactoring utils::Directory.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1022 e378c898-3ddf-0310-93e7-cc216c733640
2007-12-23 19:12:23 +00:00
rakshasa 73c41074ec * Fix TextElement* to use rpc::target_type.
* Moved most of src/ui/download.cc to use commands for TextElements.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@967 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-30 16:33:52 +00:00
rakshasa 85d14f0e96 * Cleaned up the 'umask' command and renamed 'working_directory' to
'cwd'.

* Added 'd.{get,set}_custom[1-5]' for user scripts.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@963 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-23 21:21:11 +00:00
rakshasa 38f8a00c0c * Moved PF_LOCAL to rak/socket_address.h and made it portable.
* Added "d." to '{create,delete}_link', and marked the old names as
obsolete.

* Added "d.{get,set}_message'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@962 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-22 07:16:29 +00:00
rakshasa f117b9dd16 * Allow loading torrents from https and ftp uri's.
* Added framework for commands on peers, but due to deficiencies in
the libtorrent API it won't be enabled yet.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@955 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-16 20:08:32 +00:00
rakshasa 788b496241 * Fix the use of strlcpy.
* Allow lists as arguments in commands by using '{' and '}'. The list
will be recursed and all '$' will be called, while '~' will only be
expanded when in the first element in the list. E.g "execute =
touch,{~/tmp/,$get_client_version=}"

* Added rak::path_expand that works on char buffers.

* Fixed RequestList::calculate_pipe_size so it doesn't request too
many pieces from fast peers.

* Added 'execute_log' for logging the result of calls to 'execute'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@952 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-12 13:41:50 +00:00
rakshasa ef794b8eda * Added a default low_diskspace check for 500MB.
* Properly catch the exceptions being thrown by the 'in_*' events.

* Expand ~ in ExecFile.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@950 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-07 15:14:57 +00:00
rakshasa 535db16850 * Bumping copyright year to 2007.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@938 e378c898-3ddf-0310-93e7-cc216c733640
2007-07-19 21:29:34 +00:00
rakshasa 350bdfde7e * Allow ';' as a separator for multi-command lines. Not recognized by
the string parser, so it must be preceeded by whitespace.

* Allow escaping of newlines in the resource file.

* Cleanup of the parse_command_* commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@936 e378c898-3ddf-0310-93e7-cc216c733640
2007-07-17 16:24:57 +00:00
rakshasa a864d5938d * More commands moved to the new system.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@897 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-01 19:00:17 +00:00
rakshasa 6691298fb4 * Added XMLRPC-C support and hooked it up to FastCGI. Calling a test
function is now possible.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@887 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-09 17:28:54 +00:00
rakshasa b009734d5c * Added support for dvorak keyboard layout. Patch by matled@gmx.net.
* Moved TrackerManager::close() call to the DownloadWrapper dtor so
that tracker STOPPED request will be sent when closing a torrent.

* Fixed some portability issues with Solaris, but still some remain.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@872 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-23 00:00:15 +00:00
rakshasa de3ab556e5 * Added missing includes of <algorithm> required by newer gcc
versions. Patch by falk@debian.org.

* Swapped the use of PCB::m_up.interested() with
PCB::m_down.interested(). This means that m_up.interested()/choked()
says if the remote peer is interested and if upload to it is choked,
while m_down.interested()/choked() says if local is interested and if
download from the remote peer is choked.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@862 e378c898-3ddf-0310-93e7-cc216c733640
2007-02-23 16:33:26 +00:00
rakshasa 1d1b5710fa * Added "create_link" and "delete_link" options for creating and
deleting symbolic links to downloads.

* Added "on_*" options for calling commands on state changes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@849 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-20 19:42:22 +00:00
rakshasa e59b5bf7b6 * Make VariableMap handle both global and core::Download
variables. Variable now has functions for both void and
core::Download*, where the core::Download* is discarded if necessary.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@847 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-17 15:18:33 +00:00
rakshasa d030c5401e * Cleanup of the auto* scripts, curl and openssl checks are now done
with pkg-config.

* Minor changes to included headers and autoconf scripts required by
Solaris.

* Added const char* to VariableMap::has.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@846 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-16 17:30:13 +00:00
rakshasa de744ad11d * Converted VariableMap and ViewManager to using const char* as the
key, since they are never changed nor added from outside. This cut the
stripped binary size by 50KB.

* Use a shared have piece queue for each download. Each connection has
a time-stamp for the last have message they sent, which is checked
against the queue. This also avoids the race condition where some
peers would get incomplete views of our bitfield due to lost have
messages during handshake.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@839 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-01 14:57:10 +00:00
rakshasa fe7adfc999 * Cleanup of TextElement.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@838 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-01 06:52:56 +00:00
rakshasa c453565e8f * Added FileListIterator to the API, which allows the client to
iterate through FileList as if it consisted of directories.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@831 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-25 10:54:31 +00:00