Commit Graph

109 Commits

Author SHA1 Message Date
Jari Sundell e11be5cdbe Fixed some compile issues. 2011-11-22 16:46:59 +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 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 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 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 afe1312eb6 * Added some missing includes.
* Changed more key bindings in ElementDownloadList to commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1038 e378c898-3ddf-0310-93e7-cc216c733640
2008-02-03 14:30:58 +00:00
rakshasa 87e02737ce * Removed the Object ctor taking an Object::type_type.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1026 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-06 15:41:30 +00:00
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 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 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 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 297b4b5f1d * Renamed VariableMap to CommandMap.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@913 e378c898-3ddf-0310-93e7-cc216c733640
2007-06-16 17:46:06 +00:00
rakshasa f8f2f80960 * Moved the rest of the helper functions from VariableMap to
parse_commands.h.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@912 e378c898-3ddf-0310-93e7-cc216c733640
2007-06-16 17:22:39 +00:00
rakshasa 0de4bbea7a * Re-enabled the umask option.
* Moved around command related classes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@911 e378c898-3ddf-0310-93e7-cc216c733640
2007-06-16 00:14:09 +00:00
rakshasa 64e1d1f440 * Was using wide char std::isspace version by mistake.
* More cleanup of old option code.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@910 e378c898-3ddf-0310-93e7-cc216c733640
2007-06-09 21:48:13 +00:00
rakshasa 8a1220fd5b * Cleanup of old Variable stuff.
* Fixed a bug that would cause ^O to make an extra call to
"set_directory" for the log, instead of "get_directory".


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@909 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-31 16:40:34 +00:00
rakshasa 13dc0c942a * Allow binding of the SCGI socket to a specific address, and added
"scgi_dont_route" variable.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@908 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-23 21:47:11 +00:00
rakshasa 2db205a89d * Added support for named pipes and proper parseing of arguments for
SCGI.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@906 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-21 01:51:52 +00:00
rakshasa 5f274b2619 * Added support for SCGI rpc calls.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@905 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-20 17:30:00 +00:00
rakshasa bc7d485391 * Fixed xmlrpc so it registers all the commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@904 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-18 22:01:29 +00:00
rakshasa d33d283293 * Last of the old commands moved.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@903 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-18 20:34:31 +00:00
rakshasa 7d1bb524ba * Moving download variables into command_download.cc.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@902 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-18 14:24:57 +00:00
rakshasa 9fe72cb3b5 * Replaced DownloadFactory's m_variables with a torrent::Object map.
* Starting work on moving the download commands to the new command
framework.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@901 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-16 14:39:03 +00:00
rakshasa 032bae7030 * Removed old non-download set/get functions from VariableMap.
* Added forgotten command_download.cc file.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@900 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-11 22:47:15 +00:00
rakshasa c986357bab * Automatically add variables to XMLRPC unless added as private.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@898 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-04 16:15:16 +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 2ede6f03ab * Continuing conversion to the new command infrastructure.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@896 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-29 18:46:55 +00:00
rakshasa 43fd2c92ec * Return torrent::Object instead of reference from
utils::VariableMap::call_command(...).

* More cleanup of the command calls.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@895 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-28 02:37:08 +00:00
rakshasa 7077aba019 * More cleanup of commands, including some optimization by avoiding
some heap allocations.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@893 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-18 15:15:06 +00:00
rakshasa d0ae367dca * Adding missing files.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@892 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-17 20:22:24 +00:00
rakshasa 81637ff5a0 * Converting various variables to the new command version.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@891 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-17 14:57:56 +00:00
rakshasa 7c121ac049 * Starting work on merging get/set variable. Moved the bool and value
variables, still might have missed some prior uses that might cause
exceptions to be thrown.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@890 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-14 12:43:19 +00:00
rakshasa 8501832788 * Bumped to 0.11.5/0.7.5.
* Added "call.set_upload_rate", "call.get_upload_rate" and
"call.get_directory" XMLRPC calls.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@888 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-09 21:09:53 +00:00
rakshasa 3bd0d6fb27 * Allow certain commands, like schedule and on_* to take unquoted
multi-arg commands. So "on_start = link1,create_link=tied,,.started"
now works again.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@879 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-27 15:45:18 +00:00
rakshasa ee6eae6c84 * Working on new infrastructure for parseing commands. It now passes a
list instead of a string when calling a multi-parameter command, which
handles escaped spaces, commas and quotes correctly.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@877 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-25 18:03:07 +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 ef3ecb0b97 * The "tos" option was parsing the hex value with unit == 0, which
caused it to always zero it.

* Split the chunks in the transfer list to fit the display. Patch by
Josef Drexler.

* Forgot to check if there were any torrents hashing before starting
new non-fast-resume checks, which would cause multiple torrents to be
hashed at once.

* File progress is now updated when hash_check is called, and no
longer cleared on close. This fixes a bug with >100% file progress
being reported and optimizes file progress updating for completed
torrents.

* Disabled IPv6 http requests so the trackers won't think we support
it.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@857 e378c898-3ddf-0310-93e7-cc216c733640
2007-02-09 16:39:51 +00:00
rakshasa 81921ba9a4 * Added "base" type to the "*_link" commands.
* Added a bunch of client id's from solsTiCe.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@850 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-21 16:10:27 +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 b301faf3ca * Fixed a leaking rak::address_info in TrackerUdp. Patch by Josef
Drexler.

* Finished converting the variables in core::Download to use the new
get/set_d(core::Download, ...) functions.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@848 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-20 12:42:14 +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 e122cc928a * Removed the SocketFile dtor which contained an obsolete check of
is_open().

* Added multi-line parser to VariableMap and replaced the various
calls to process_command in main.cc with a single call.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@845 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-13 12:20:22 +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 fcb8154188 * Cleaned up the exception classes so they require less space. This
reduced the size of the stripped libtorrent by 1/7.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@822 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-11 10:33:09 +00:00
rakshasa c992fa60df * Moved some stuff from Content into FileList.
* Resume data was not being used as it was comparing the number of
entries with size_bytes, not size_files.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@812 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-30 15:14:26 +00:00