Commit Graph

530 Commits

Author SHA1 Message Date
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 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 66a2af991a * Added groups and started reworking the ratio handling.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1078 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-09 16:20:57 +00:00
rakshasa 5166253190 * Added 'argument.?' commands that passing of arguments to commands
created with 'system.method.insert'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1077 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-09 12:56:10 +00:00
rakshasa ca9d0b1773 * Added string, value and bool types to 'system.method.insert' for
storing variables.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1076 e378c898-3ddf-0310-93e7-cc216c733640
2008-11-07 16:01:18 +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 85f5b7dc46 * Fixed two instances of string includes where <strings.h> was used
instead of <string.h>.

* Fixes {stop,close}_on_ratio calling further commands even when the
"ignore commands" flag is set.

* Work-around for OpenBSD's broken sys/event.h, which fails to compile
if it's the first (or only) included header. (Ticket #1470)

* Fixes compilation with old libcurl versions. (Ticket #1471)

* Fix compile error on systems that lack mincore(2).

* Fixes a crash in epoll due to libcurl/c-ares bug:
PollEPoll::modify(...) epoll_ctl call failed.

All patches by Josef Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1072 e378c898-3ddf-0310-93e7-cc216c733640
2008-10-07 13:14:59 +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
rakshasa 07b9616ef6 * Use user-modifiable commands instead of slots for the 'on_*' events.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1070 e378c898-3ddf-0310-93e7-cc216c733640
2008-10-01 14:19:51 +00:00
rakshasa d7c2960d1e * Added system.method.{insert,erase} commands that allows
user-specified commands. "system.method.insert=foo,print=Bar"


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1069 e378c898-3ddf-0310-93e7-cc216c733640
2008-09-27 06:28:50 +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 879a019757 * Various fixes to the new polling code to handle bad libcurl/cares
behavior. Patch by Josef Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1067 e378c898-3ddf-0310-93e7-cc216c733640
2008-08-31 20:49:55 +00:00
rakshasa 854d119ff2 * Added missing files.
* Inserted more error-checking in kqueue and fixed some potential bugs.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1066 e378c898-3ddf-0310-93e7-cc216c733640
2008-08-31 19:01:19 +00:00
rakshasa be8b59b00b * Use curl's new polling interface so we don't have to switch to
select() while http transfers are active.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1065 e378c898-3ddf-0310-93e7-cc216c733640
2008-08-27 08:41:08 +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 5a700f34d9 * Fix a slight memory leak in peer exchanges. Patch by Josef Drexler.
* Fixed mix-up in version numbers causing an incompatibility for .so
libraries. Patch by Josef Drexler for ticket #1333.

* Fix excessive HAVE messages being sent after handshake when download
has been active for a while. Patch by Josef Drexler for ticket #1372.

* Make --enable-ipv6 not break DHT on Mac OS X. Patch by Josef Drexler
for ticket #1359.
 
* Fix crash when contacting tracker. Patch by Josef Drexler for ticket
#1272.

* Fix stopping downloads not working properly. Patch by Josef Drexler
for ticket #1335.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1062 e378c898-3ddf-0310-93e7-cc216c733640
2008-07-05 12:13:12 +00:00
rakshasa bfa7523677 * Fix a crash in DHT due to returning a reference to a temporary
variable. Patch by Josef Drexler for ticket #1221.

* Fix an off-by-one error that causes a crash if a DHT node advertises
an ID of "FFFFFFFF...". Patch by Josef Drexler.

* Fix a crash in initial seeding to due a typo not passing the right
flag. Patch by Josef Drexler.

* Fix d.connection_seed being set to "leech" when download wasn't set
to initial_seed. Patch by Josef Drexler for ticket #1376.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1061 e378c898-3ddf-0310-93e7-cc216c733640
2008-07-05 12:01:00 +00:00
rakshasa 108ec969f7 * Minor fixes to configure scripts, updated man page and bumped the version.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1060 e378c898-3ddf-0310-93e7-cc216c733640
2008-05-07 12:18:36 +00:00
rakshasa e3fa31b6df * Initial seeding support added. Patch by Josef Drexler.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1058 e378c898-3ddf-0310-93e7-cc216c733640
2008-05-05 19:16:26 +00:00
rakshasa 3f64e8b1fa * Fixed EINTR handling in execute command. Patch by anonymous.
* Fixed a couple of memory leaks in xmlrpc.cc. Reported by Novik.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1057 e378c898-3ddf-0310-93e7-cc216c733640
2008-05-01 17:14:43 +00:00
rakshasa fcbad61577 * Revision bump.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1054 e378c898-3ddf-0310-93e7-cc216c733640
2008-04-20 13:46:39 +00:00
rakshasa 3ddd04a9a5 * Fixed another bug in scgi_tast.cc.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1053 e378c898-3ddf-0310-93e7-cc216c733640
2008-04-16 10:58:04 +00:00
rakshasa 12b43d78a3 * Fixed a potential leak in scgi_task.cc.
* Removed std:: from snprintf in window_file_list.cc.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1052 e378c898-3ddf-0310-93e7-cc216c733640
2008-04-15 11:50:14 +00:00
rakshasa 41088740bd * Added dummy scheduler commands.
* Add/remove downloads from the 'active' view on resume/pause.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1051 e378c898-3ddf-0310-93e7-cc216c733640
2008-04-11 18:03:27 +00:00
rakshasa aab493caad * Used different ncurses calls in the file list so that UTF8 filenames
should show up properly.

* More cleanup of Views.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1050 e378c898-3ddf-0310-93e7-cc216c733640
2008-04-02 17:11:44 +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 a6045c9ea5 * Made the signal in View trigger using a task, thus avoiding bad
recursions and wrongly orderer commands. This should fix some problems
with hash checking returning errno 0.

* More changes to View usage.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1048 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-27 15:41:11 +00:00
rakshasa e8e5ef337b * Made pause/resume trigger on insertion into the started queue.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1047 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-24 19:30:56 +00:00
rakshasa 8fbaca61b1 * Refactoring to change the DownloadList events to commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1046 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-23 12:16:18 +00:00
rakshasa 199bd1985c * Added view_event_{added,removed} commands that sets a command to be
triggered when a download is added/removed from the specified view.

* Minor compiler errors fixed.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1045 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-20 11:50:57 +00:00
rakshasa 7062935724 * Replaced View sort code with commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1044 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-18 09:11:59 +00:00
rakshasa d22e1ae30e * Bug fixes to the previous rev's View code.
* Fixed dht alignment issues. Patch by Josef Drexler.

* Removed duplicate code in PeerConnection{Leech,Seed}. Patch by Josef
Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1043 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-16 15:31:11 +00:00
rakshasa f9ff1cf5ac * Changed view_filter to use boolean commands instead of custom
functors.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1042 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-16 13:55:40 +00:00
rakshasa 8cc7c8430d * Fixed minor bugs in the display of tracker groups. Patch by Josef
Drexler.

* Cleanup of the CommandMap class.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1041 e378c898-3ddf-0310-93e7-cc216c733640
2008-03-13 14:28:17 +00:00
rakshasa b21f465969 * Added {get/set}_xmlrpc_size_limit to allow the user to specify
larger buffer size for handling direct loading of torrents through
xmlrpc.

* Allow file and tracker targets with the compact xmlrpc syntax,
e.g. "<infohash>:f<id>".

* Fixed an alignment bug in the DHT code.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1040 e378c898-3ddf-0310-93e7-cc216c733640
2008-02-28 19:54:36 +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 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 1b96bd6016 * Bumped to version 0.12.0/0.8.0.
* Removed Download::disconnect_peer as it can call ConnectionList
directly.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1035 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-28 18:21:36 +00:00
rakshasa 805689c3af * Preliminary API changes for the throttle groups. Patch by Josef
Drexler with some changes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1034 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-28 16:56:01 +00:00
rakshasa 0fdb72b05b * Made Peer virtual so casting between PCB and Peer will work properly.
* Updated the man page.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1033 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-27 15:58:26 +00:00
rakshasa 259cb77799 * Made PCB inherit from Peer.
* Added man page entry for ^E.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1032 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-27 14:01:10 +00:00
rakshasa 728c6ac9bd * Added ^E for setting 'create/resize queued' on files in a torrent.
* Minor cleanup of the API.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1030 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-22 15:50:48 +00:00
rakshasa c19af8f389 * Cleanup of the Object api.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1028 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-20 07:48:52 +00:00
rakshasa 9e8b4add9d * Fixed a race condition in the handshake read/write code. Patch by
Josef Drexler.

* Fixed the --with-xmlrpc-c autoconf check so that you can pass an
alternative path to an xmlrpc-c-config script.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1027 e378c898-3ddf-0310-93e7-cc216c733640
2008-01-12 18:39:19 +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