* Made torrent::Rate::rate_type uint64_t and added sanity checks due to reports of bad download/upload values being reported to some trackers.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1103 e378c898-3ddf-0310-93e7-cc216c733640
* 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
* 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
* 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
* Disabled strict ordering check for the bencode decoder added 2 revisions ago, as it might be messing up PEX, etc.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1093 e378c898-3ddf-0310-93e7-cc216c733640
* 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
* Fixes a crash when parsing a malformed get_peers (or find_node) response throws an exception and fails to remove the corresponding transaction. Ticket #1622.
* Fix automatic unchoking of new peers exceeding the max upload slots of the download.
* Stops rtorrent from always creating and resizing ALL files, even those set to "off". Files will still be created, but with a size of zero, until a part of them is getting downloaded. This helps with filesystems that don't support sparse files (such as FAT, HFS+, and others).
* Fix inefficient piece distribution due to linear chunk request strategy by randomizing position every few (on average 32) chunks, see ticket #190.
* Fixes lack of return values for user-defined commands (using system.method.insert). When there are multiple commands, returns the result of the last one.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1089 e378c898-3ddf-0310-93e7-cc216c733640
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
* 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
* Fixed a potential buffer overflow in displaying of non-UTF8
filenames.
* Changed torrent::DownloadList::close_directly() so doesn't save the
session if the underlying file/directory has been moved or
removed. This change, in addition to calling 'd.set_directory=' before
'execute=mv,...', as previously shown in the examples, will make
rtorrent behave correctly when 'check_hash=no' is set.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1084 e378c898-3ddf-0310-93e7-cc216c733640
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
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
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
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
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
* 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
* 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
* 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
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