Commit Graph

784 Commits

Author SHA1 Message Date
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 4a449bae67 * Added configure options that allow building universal binaries.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@889 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-10 22:36:43 +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 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 d6fd8f08dc * Added FastCGI support for RPC. This will be hooked up with XMLRPC-C.
* Experimenting with move semantics for Object.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@886 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-06 22:12:52 +00:00
rakshasa 93afd05e18 * Updating to 0.7.4/0.11.4.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@884 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-30 07:13:44 +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 0ab5bae22e * Generated man page.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@874 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-24 15:05:09 +00:00
rakshasa 5450971273 * Fixed an incorrect exception check in
ResourceManager::receive_upload_unchoke(...).

* Allow the client to manually cancel tracker requests so that quick
shutdown works correctly after moving the TrackerManager::close() call
to DownloadWrapper::~DownloadWrapper().


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@873 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-24 00:22:23 +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 59c6f97cb9 * Added "max_{up,down}loads_{div,global}" options and man page entries.
* PCB::should_request() didn't check if m_downUnchoked was true, just
m_downChoke.choked(). This would cause requests to be sent while we
were still choked by remote.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@871 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-20 16:13:20 +00:00
rakshasa 3b13fc7f05 * Send uninterested to peer when no download slots are available, and
various other stuff to make it work properly.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@870 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-18 01:56:29 +00:00
rakshasa 3ef8384c38 * Set allowed encodings for tracker and http requests.
* Fixed two valgrind errors in the ChokeManager code.

* Added 'seeding' view on key 8. Remeber to fix the man page.

* Fixed an exception being thrown in ChokeManager::cycle(...) due to a
missing range check on the number of unchokes we do.

* Moved choke/queued state to a new ChokeManagerNode class.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@869 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-16 23:22:51 +00:00
rakshasa f43cdad650 * Added global download slots. The "max_downloads_hack" option may be
used to test this feature. Note that there seems to be a bug in the
code causing exceptions.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@866 e378c898-3ddf-0310-93e7-cc216c733640
2007-03-03 20:32:18 +00:00
rakshasa b46caac088 * Added "max_uploads_div" option to set fewer global upload
slots. Currently just intended for testing purposes.

* Renamed and changed the use of ProtocolBase variables within
ChokeManager.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@864 e378c898-3ddf-0310-93e7-cc216c733640
2007-02-24 13:54:48 +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 cdd2da8df5 * Replaced the single container in ChokeManager which used to contain
all connections, with an unchoked and an interested container. The
semantics of the code should be the same.

* Bump version number to 0.11.3/0.7.3.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@855 e378c898-3ddf-0310-93e7-cc216c733640
2007-02-02 11:18:53 +00:00
rakshasa ecdfaed06f * Updated the man page, probably still needs some cleanup, but meh.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@852 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-26 08:48:12 +00:00
rakshasa 5a9fa2fdcd * Fixed a bug that cause the hash checker not to start.
* Added "base_path" and "base_filename" types to the
"create/delete_link" command.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@851 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-22 14:45:18 +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 c1ac4a2319 * Cleaned up and moved FileManager to the API. It now only keeps track
of open files, which makes the dynamic opening/closing of files much
more efficient if very many large torrents are open.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@843 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-09 11:52:59 +00:00
rakshasa 2be918261e * Bump to version 0.11.2/0.7.2.
* Allow the user to collapse the directories with the '/' key.

* Cleanup of core::Manager::receive_hashing_changed().


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@841 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-05 13:27:56 +00:00
rakshasa 3b38c4ab9c * Limit the number of simultanious http connections.
* Added max_open_http to the man page.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@840 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-02 17:06:08 +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 0854e65775 * Changing priority of a directory changes the priority for all files
within that directory.

* Removed a buggy hack in FileListIterator::operator++().

* Cleaned up display of file sizes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@835 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-27 15:11:41 +00:00
rakshasa 06dad41ff8 * Cleanup of the file list.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@834 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-26 10:05:44 +00:00
rakshasa eabbf33a76 * Added an info screen to the file list and added more information to
the list.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@833 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-25 18:26:40 +00:00
rakshasa 25702ea4b7 * Finished FileListIterator and basic navigation of the file list.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@832 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-25 13:19:45 +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
rakshasa c65b6aa9ff * Added file_path_iterator that allows the client to iterate through
FileList in a structured manner. Messed up the file list view to test
it.

* Added operator[] and at(...) to torrent::FileList and torrent::Path.

* Fixed Handshake::fill_read_buffer(...) that was throwing due to a
bad error check. Patch by Josef Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@830 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-22 10:54:39 +00:00
rakshasa aab31e5ea5 * Added path match depth to torrent::File which can be used to quickly
determine the common root directory of two adjecent files.

* Cleaned up RC4 class.

* Fixed --with-openssl so it accepts user-supplied paths.

* Call abort instead of exit when receiving a SIGSEGV or SIGBUS.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@829 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-21 16:27:48 +00:00
rakshasa fbf1a8b8a6 * Fixed a bug caused by gcc-3.3.5 miscompiling the exception thrown in
rtorrent/src/core/download_list.cc:100.

* Disable encryption support when compiling libtorrent with
--without-openssl. Patch by Josef Drexler, public domain as per
earlier agreement.

* Converted torrent::HashQueue from std::list into a std::deque for
better cache locality.

* Fixed a bug that would cause storage errors to trigger an
internal_error being wrongly thrown.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@828 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-18 15:32:31 +00:00
rakshasa cc44fb175d * Cleaned up hash checking, and allow resuming stopped checks.
* Fixed setting of TOS so it doesn't always set it to throughput.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@827 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-18 08:24:01 +00:00
rakshasa d8e5a59b92 * Fixed a bug in download_factory.cc that was setting the chunks done
to 0.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@824 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-13 08:06:16 +00:00
rakshasa 16bb9a87c8 * Cleaned up error.h and HandshakeMessage.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@823 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-12 14:31:39 +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 460aac5df0 * Check for duplicate filenames when opening a torrent.
* Removed unnessesary functions from torrent.h.

* Cleanup of Handshake.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@820 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-09 16:51:34 +00:00
rakshasa 407d570de3 * Cleaned up the destruction of Handshake objects, and fixed a use of
a free'ed rak::socket_address.

* Updated rtorrent.1.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@817 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-07 08:04:52 +00:00
rakshasa 59b6ed61ce * Added helper functions for splitting files in FileList.
* Added "split_file_size" and "split_suffix" options.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@815 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-05 09:50:59 +00:00