Commit Graph

784 Commits

Author SHA1 Message Date
rakshasa 77a7d13b39 * Automatically prune the file status cache every day.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1025 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-01 14:13:14 +00:00
rakshasa 7abc459d74 * Keep a cache listing all, including failed, torrent loads and the
mtimes of those files. This is used to ensure that e.g. the watch dir
does not try to load bad/duplicate torrents, in addition to optimizing
the pruning of those already loaded.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1024 e378c898-3ddf-0310-93e7-cc216c733640
2007-12-31 10:12:17 +00:00
rakshasa ce64ea89b1 * Properly use d.set_directory_base when
* Added get_{up,down}_{rate,total}.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1023 e378c898-3ddf-0310-93e7-cc216c733640
2007-12-30 04:43:05 +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 ccb3713a57 * Added "d.set_directory_base" command that handles single and multi
file torrent equally.

* Fixed man page entry on 'umask', it should be 0022 not 0664.

* Cleaned up File and FileList classes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1021 e378c898-3ddf-0310-93e7-cc216c733640
2007-12-23 08:05:00 +00:00
rakshasa 51e27e29c8 * Properly clean up SCGI on exceptions so it deletes the socket
file. Found by Josef Drexler.

* Handle mtime properly in resume_save.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1020 e378c898-3ddf-0310-93e7-cc216c733640
2007-12-16 08:25:57 +00:00
rakshasa 71ac2cc8e1 * Partial implementation of better detection and handling of deleted
files in a torrent.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1017 e378c898-3ddf-0310-93e7-cc216c733640
2007-12-10 17:17:40 +00:00
rakshasa 6db7ada26c * Allow opening a torrent without creating any files. Still requires
modification of the client to work.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1016 e378c898-3ddf-0310-93e7-cc216c733640
2007-12-02 15:39:58 +00:00
rakshasa 4704c91a8f * Fixed a crash in apply_on_ratio when an iterator got invalidated by
erasing the download currently pointed to.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1015 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-30 14:33:20 +00:00
rakshasa f05dd5b152 * Added support for DHT. Patch by Josef Drexler, public domain as per
prior agreement.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1013 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-28 15:00:13 +00:00
rakshasa 4e3a867257 * Added 'p.multicall' command, though it lacks sorting atm.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1012 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-27 01:56:20 +00:00
rakshasa 66037a7ae2 * Fixed use of old max/min_peers commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1011 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-17 06:03:41 +00:00
rakshasa d86505924b * Moved ConnectionList into the API and made rtorrent use it.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1010 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-15 14:26:12 +00:00
rakshasa 2fe964059f * torrent::Peer now is used as a pointer, instead of an instance
containing a pointer.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1007 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-13 11:33:39 +00:00
rakshasa 3f644aed8f * Properly handle NULL ptr in target_any commands.
* Enable PEX by default.

* Renamed Download::start2/stop2.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1006 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-10 16:34:37 +00:00
rakshasa 04e6575e5d * Replaced the old TrackerList API with the cleaned up
TrackerContainer code.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1005 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-08 16:33:51 +00:00
rakshasa 4a2ae4d339 * New Tracker API.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1002 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-02 10:47:12 +00:00
rakshasa c326c7f43a * Added insert_preserve helper functions to torrent::Object.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1000 e378c898-3ddf-0310-93e7-cc216c733640
2007-11-01 08:32:08 +00:00
rakshasa ff2c25bdeb * Bumped version to 0.7.9/0.11.9.
* Fixed more sigc++ header includes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@995 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-25 11:00:24 +00:00
rakshasa d13e502ee4 * Print to the log when close_on_diskspace gets triggered.
* Cleared out unused TextElement code.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@994 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-25 09:13:30 +00:00
rakshasa 4038e78665 * Changed element_peer_list.cc to te_command.
* Added several Peer commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@993 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-23 15:56:58 +00:00
rakshasa 61098513c6 * Cycle the order in which downloads are handled during ticks to
ensure resource usage gets spread out over time.

* Changed element_file_list.cc to use te_command.

* File commands on file list iterators will be called on the File
pointed to.

* Fixed some sigc++ 2.1 compile errors.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@992 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-21 04:27:49 +00:00
rakshasa 78f8b19aa4 * Limited the number of addresses in the outgoing pex list to 200.
* Show private flag in download info.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@988 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-12 14:46:41 +00:00
rakshasa aad01906d3 * Bugfixes to the PEX changes.
* Minor changes to statvfs detection.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@987 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-09 16:03:30 +00:00
rakshasa 099ec98210 * Require the caller to push data to ProtocolExtension's buffer
directly.

* Don't allow extension messages larger than 2^15.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@986 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-08 15:18:50 +00:00
rakshasa 9cb48a9f66 * Disable PEX when we are connected to enough peers.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@983 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-04 14:54:31 +00:00
rakshasa 166e8e1357 * Display size of pex for each download.
* Limit the number of PEX connections to 5 per download.

* Fixed minor bugs in the new PEX code. Patch by Josef Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@981 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-28 08:50:59 +00:00
rakshasa b32c07a638 * Optimized AvailableList::erase.
* Moved PeerInfo and DownloadMain into Extensions.

* Added a flag for if we've received the initial handshake and moved
setting of flag_received_ext to Extension.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@980 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-26 07:45:44 +00:00
rakshasa 81782e2e9f * Set "encryption=allow_incoming,prefer_plaintext,enable_retry" by
default.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@977 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-07 21:02:15 +00:00
rakshasa 804eb769a0 * Added "close_on_ratio".
* Allow commands to be appended to "{stop,close}_on_ratio".


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@976 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-06 22:39:43 +00:00
rakshasa 3b82216a1b * Renamed 't.get_enabled' to 't.is_enabled'.
* The torrent is no longer closed on finished for on_finished
commands, instead d.set_directory causes the download to call
close_directly.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@974 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-05 17:52:16 +00:00
rakshasa 48f13fb7a3 * Don't skip the last line in rc files missing the final
newline. Patch by Jussi Judin under Public Domain.

* Added warnings on usage of scgi_port.

* Include a file's completed chunks count in the resume data.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@973 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-04 21:32:42 +00:00
rakshasa 95516fe3b5 * Renamed pex_{enabled,active} to is_pex_*.
* Changed the download info screen to only use commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@972 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-03 00:59:34 +00:00
rakshasa 1cc1374c7a * Made rpc::CommandSlot into a template class and removed
"command_*_slot.{cc,h}".

* Added 'if' command. 


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@971 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-02 15:07:37 +00:00
rakshasa ac2f5a8882 * Only request from the same tracker more than once if PEX is disabled.
* Added target_any.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@970 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-31 11:44:21 +00:00
rakshasa 332b4a303f * Added Peer Exchange support, enable with the "peer_exchange"
option. Patch by Josef Drexler, public domain as per earlier
agreement.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@968 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-30 20:35: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 32b74ffc48 * Proper fault handling for bad SCGI requests.
* Cleaned up duplicate code in 'xmlrpc.cc'.

* Cleaned up 'parse_commands.h'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@966 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-27 23:00:48 +00:00
rakshasa 02b790c0bf * Added torrent::Download::{start2,stop2}(int flags) that will replace
the old start/stop functions. The old functions are now just wrappers
for the new.

* Fixed the tracker requests when finishing a torrent.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@965 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-26 02:31:32 +00:00
rakshasa c6a43429a2 * Added support for XMLRPC_TYPE_BASE64.
* Added 'load_raw*' commands for loading torrents directly from the
data passed through the first argument.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@964 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-24 12:30:29 +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 0390b7ec00 * Added 'f.multicall' and 't.multicall', and renamed 'call_download'
to 'd.multicall'.

* Cleanup of 'rpc/parse_commands.h'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@961 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-20 21:29:59 +00:00
rakshasa bac7d0ba3b * Client address resolver support. Patch by Josef Drexler.
* Added 'get_name' to the download list window title.

* Bumped version numbers.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@960 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-20 13:40:09 +00:00
rakshasa ded9e12ff1 * Added 'get_pid', 'get/set_name' and 'cat' command.
* SocketFd::open_local() should use SOCK_STREAM, not SOCK_DGRAM.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@959 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-20 01:38:38 +00:00
rakshasa 5ec7790aa9 * Added 'd.get_hash' and 'get_hostname' commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@958 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-18 23:44:59 +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 11976871ac * Dynamically sized SCGI read buffer.
* Added 'call_command' that takes a view as the first parameter and
then a list of commands. It will return a list of lists containing the
results from those commands.

* Fixed the xmlrpc-c-config usage.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@954 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-15 21:38:44 +00:00
rakshasa 6ca373d293 * Renamed all commands to from e.g "get_d_*" to "d.get_*". Remember to
update your rc file.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@953 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-12 18:41:09 +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