Commit Graph

100 Commits

Author SHA1 Message Date
Jari Sundell f51b280cbf Merge branch 'master' into c++11 2011-12-27 15:50:01 +09:00
Jari Sundell 4c29d3b714 Removed extra semicolon. 2011-12-26 14:32:45 +09:00
Jari Sundell 58727fe7fd Fixed compiler issues with gcc-4.6 c++0x. 2011-11-18 17:28:50 +09:00
Jari Sundell 00a42357d0 Added 'd.tracker.send_scrape = <seconds_to_request>' command for sending scrape requests to all trackers that support it.
Newly inserted downloads send scrape requests after 30 seconds.
2011-11-08 01:03:29 +09:00
Jari Sundell 575968b291 Use new function for inserting tracker. 2011-11-08 01:03:10 +09:00
Jari Sundell eb90b92930 Added 'd.tracker.insert = <tracker_group>, <tracker_url>' for adding trackers to a download. 2011-11-05 22:19:57 +09:00
Jari Sundell ed6182589a Removed deprecate tracker focused_index function calls. 2011-11-04 02:24:57 +09:00
rakshasa 4d313e6353 Updated copyright information.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1301 e378c898-3ddf-0310-93e7-cc216c733640
2011-10-09 06:30:14 +00:00
rakshasa ba09df1afc Moved the sanity checks for 'd.directory.set' to 'Download::set_root_directory(path)' so that it always gets used.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1297 e378c898-3ddf-0310-93e7-cc216c733640
2011-10-04 15:44:00 +00:00
rakshasa 4e3ecc01b2 * Changed tracker logging to use the new logging facilities.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1286 e378c898-3ddf-0310-93e7-cc216c733640
2011-09-25 13:25:36 +00:00
rakshasa 4914d798f1 * Changing push_log calls to the new logging facility.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1284 e378c898-3ddf-0310-93e7-cc216c733640
2011-09-21 05:07:06 +00:00
rakshasa 1e83c626f8 * Refactoring of choke_queue and how choking is handled.
* Added 'd.{up,down}loads_{max,min}', and the keys 1/2/3/4 and !/@/#/$ control these.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1274 e378c898-3ddf-0310-93e7-cc216c733640
2011-09-07 03:53:38 +00:00
rakshasa e239b673cf * Properly detect issues with 'd.directory.set' being called after the data files have been moved.
* Added counters for unchoked peers.

* CLang fixes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1272 e378c898-3ddf-0310-93e7-cc216c733640
2011-08-21 15:04:22 +00:00
rakshasa dfc159f67a * Fixed dummy choke groups default heuristics and other minor issues.
* Added 'd.group.name'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1267 e378c898-3ddf-0310-93e7-cc216c733640
2011-08-10 01:39:10 +00:00
rakshasa ea192b342c * Fixed 'd.group.set' for the mainline version.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1264 e378c898-3ddf-0310-93e7-cc216c733640
2011-08-06 08:01:09 +00:00
rakshasa 882a64af77 * Bumped the number of incoming connections for SCGI.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1262 e378c898-3ddf-0310-93e7-cc216c733640
2011-08-04 06:21:06 +00:00
rakshasa adef434bc3 * Added 'd.disconnect.seeders' and 'd.accepting_seeders{,.enable,.disable}' commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1260 e378c898-3ddf-0310-93e7-cc216c733640
2011-08-02 06:09:37 +00:00
rakshasa a6678a4591 * Adding wanted_chunks.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1257 e378c898-3ddf-0310-93e7-cc216c733640
2011-07-30 13:55:34 +00:00
rakshasa 4ff2793efb * Added 'd.timestamp.started'.
* Added dummy functions for a new choke group command interface.

* Added 'tracker' logging option for 'logging.libtorrent'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1244 e378c898-3ddf-0310-93e7-cc216c733640
2011-07-10 04:21:34 +00:00
rakshasa 1e206cb1c4 * Cleanup of command handling.
* Added 'd.timestamp.finished' that is set when a downloading torrent completes. For torrents that only seed it remains '0'.

* Added 'elapsed.{less,greater}' for checking the time elapsed since a time is less/greater, and it also returns false in all cases where the time is '0'.

* Fixed a bug that would cause hash checking to block exessively in some cases.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1233 e378c898-3ddf-0310-93e7-cc216c733640
2011-06-05 07:11:59 +00:00
rakshasa d2f328cc8e * Added 'method.rlookup' and 'method.rlookup.clear' commands for looking up the event handlers holding a specified key.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1231 e378c898-3ddf-0310-93e7-cc216c733640
2011-05-26 03:38:45 +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 c845863f30 * Moving ChokeManager to 'torrent/download/choke_queue.h' and cleaning up code.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1221 e378c898-3ddf-0310-93e7-cc216c733640
2011-04-24 11:17:33 +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 386250bc87 * Moved some option string stuff to libtorrent.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1197 e378c898-3ddf-0310-93e7-cc216c733640
2011-03-31 09:35:21 +00:00
rakshasa 9ed7596daf * Added framework for introducing different choking algorithms.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1196 e378c898-3ddf-0310-93e7-cc216c733640
2011-03-30 10:39:03 +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 0098b1f0b9 * Fixed a bug where callinging download specific commands through the ui with no torrent selected would cause a crash.
* Added LT_SLIM_VERSION option that will leave out unneeded command redirects from the build.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1183 e378c898-3ddf-0310-93e7-cc216c733640
2010-11-02 11:20:01 +00:00
rakshasa 0e69677dbc * Added xmlrpc calls for peer snubbed, banned and disconnect.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1180 e378c898-3ddf-0310-93e7-cc216c733640
2010-10-08 08:10:08 +00:00
rakshasa d9f409b223 * Changed command_base stored in CommandMap from a pointer to an instance.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1169 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-30 12:16:45 +00:00
rakshasa b530d35d94 * More work on rpc::object_storage and moving simple functions over to it.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1165 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-28 15:19:18 +00:00
rakshasa 575cafc7a8 * Old file/tracker related xmlrpc commands now work as before.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1163 e378c898-3ddf-0310-93e7-cc216c733640
2010-04-12 03:37:07 +00:00
rakshasa 4e4540e60f * Removed old Command classes.
* Redirects can now be made efficiently using rpc::CommandMap::create_redirect or "methods.redirect=new_key,dest_key".


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1155 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-28 18:09:09 +00:00
rakshasa 10f665e9c6 * Last of the commands converted, cleanup remaining.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1154 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-27 16:35:15 +00:00
rakshasa 8622100e09 * Added a new Command type based on std::tr1::function aimed at replacing the current ones.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1149 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-19 09:33:25 +00:00
rakshasa 589c8c147b * Cleaned up torrent/download.h.
* Removed raw_value as it is redundant.

* Fixed 'greater' command and added 'equal'. Patch by Josef Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1146 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-15 23:31:58 +00:00
rakshasa c5e839287d * Cleaned up torrent/download.h.
* Removed raw_value as it is redundant.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1145 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-15 18:31:50 +00:00
rakshasa 19be810642 * Added '-D' flag which turns of redirects for deprecated commands. Use this to ensure your scripts/webui.
* Moved DownloadInfo to src/torrent.

* Applied the magnet-uri patch.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1144 e378c898-3ddf-0310-93e7-cc216c733640
2010-03-15 16:42:05 +00:00
rakshasa 3cae3d37be * Cleaning up command names. The deprecated commands will be redirected.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1131 e378c898-3ddf-0310-93e7-cc216c733640
2010-02-16 17:29:53 +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 3359c2bbb0 * Some commands were not using the new "log.tracker" name. Ticket #1888.
* Fixed crash on empty bitfield in 'd.bitfield'.

* Fixes a file handle leak in the execute_capture functions. Patch by Josef Drexler.

* Moved ThreadBase to ./src as ./src/utils caused linker problems due to core::PollManager::create_poll_manager().


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1102 e378c898-3ddf-0310-93e7-cc216c733640
2009-11-15 06:36:01 +00:00
rakshasa 6c3a80636a * Fixed warnings in snprintf statements.
* Don't send numwant in tracker STOPPED requests.

* Reintroudced clearing of epoll event list when a socket is closed as it might cause race conditions.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1097 e378c898-3ddf-0310-93e7-cc216c733640
2009-10-22 07:01:53 +00:00
rakshasa 63af7078a3 * Include locally available chunks in the "chunks seen" statistics for completed/distributed copies. Patch by Josef Drexler.
* Added 'd.get_bitfield' command for retrieving the bitfield in hex format. Patch by Thomas Rosner. (PD)

* Fixed include headers for gcc-4.4.0. Patch by 'kloeri'.

* Switched a 'long long' with 'int64_t' in xmlrpc.cc to avoid incompatible types for some systems.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1092 e378c898-3ddf-0310-93e7-cc216c733640
2009-05-14 13:07:47 +00:00
rakshasa 855bf9a781 * Enable custom throttles, both per-download or per-IP. See http://libtorrent.rakshasa.no/ticket/20 for info and instructions. Patch by Josef Drexler.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1091 e378c898-3ddf-0310-93e7-cc216c733640
2009-05-14 09:49:18 +00:00
rakshasa 3c670a7add * Add support for any number of custom download values identified by string keys.
d.set_custom=key,value
  d.get_custom=key (returns "" if not set)
  d.get_custom_throw=key (returns error if not set)

* With this patch, rtorrent will detect and complain about .torrent files with broken bencode representation (e.g. where the order of dictionary keys is not lexicographic).

* Choose a different poll type using the RTORRENT_POLL env. variable (if it's implemented), probably only useful as RTORRENT_POLL=select.

* Add the commands execute_capture and execute_capture_nothrow that work like their other counterparts but return the OUTPUT (stdout) of the given command.

  Note that the output is not modified in any way, in particular a trailing newline is NOT removed. To work around this, have the command write its output without it e.g. using echo -n. Also note that with execute_capture_nothrow there is no way to check if the command failed.

  Example usage: d.set_custom4=$execute_capture=handler.sh

* When logging peer communication errors, show IP and peer ID to help debugging.

All patches above by Josef Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1088 e378c898-3ddf-0310-93e7-cc216c733640
2009-05-13 09:39:00 +00:00
rakshasa 6753b45627 * Bumped version numbers.
* Fixed inconsistent handling of d.get_base_path for single and
multi-torrents. Now both return the cached path even though the
torrent is closed and a new root directory set.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1085 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-19 17:25:52 +00:00
rakshasa 7600a51039 * Fix potential buffer overflows in case snprintf buffer is too
small. Patch by Josef Drexler.

* Added 'view.persistance' command that makes downloads inserted into
that view persist across sessions. Only call on user-created views.

* Added 'ratio.*' commands that call the 'group.seeding.ratio.*'
equivalents.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1080 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-16 07:54:45 +00:00
rakshasa 5648cf7dd0 * Added 'event.download.inserted_{new,session}' that are triggered
when a new or a session torrent is added. Ticket #1516.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1075 e378c898-3ddf-0310-93e7-cc216c733640
2008-10-28 17:59:40 +00:00
rakshasa 29ba4ff4bc * Enforce an http transfer timeout when libcurl fails to honor
it. Also set a 5-minute timeout for (previously unlimited) torrent
transfers and fixes the argument type for curl_easy_setopt values.

* Allows bandwidth throttles to work without floating point support.

* Adds a d.add_peer=host[:port] command to manually add a peer (not
for torrents marked "private"), port is 6881 by default.

* Allows banning the selected peer with "B". No unbanning is possible
yet.

All the above patches were written by Josef Drexler.

* Differentiate between commands that have no target, and those that
take generic targets, when using XMLRPC.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1073 e378c898-3ddf-0310-93e7-cc216c733640
2008-10-22 13:23:48 +00:00
rakshasa db4ba9fe68 * Cleaned up obsolete scheduler framework.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1071 e378c898-3ddf-0310-93e7-cc216c733640
2008-10-04 10:06:47 +00:00