mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-08 19:22:29 +00:00
* Fixes the code that detects which peer was sending bad data. Peers are then automatically banned after sending three bad chunks.
* 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
This commit is contained in:
@@ -138,15 +138,19 @@ parse_command(target_type target, const char* first, const char* last) {
|
||||
return std::make_pair(commands.call_command(key.c_str(), args, target), first);
|
||||
}
|
||||
|
||||
void
|
||||
torrent::Object
|
||||
parse_command_multiple(target_type target, const char* first, const char* last) {
|
||||
parse_command_type result;
|
||||
|
||||
while (first != last) {
|
||||
// Should we check the return value? Probably not necessary as
|
||||
// parse_args throws on unquoted multi-word input.
|
||||
parse_command_type result = parse_command(target, first, last);
|
||||
result = parse_command(target, first, last);
|
||||
|
||||
first = result.second;
|
||||
}
|
||||
|
||||
return result.first;
|
||||
}
|
||||
|
||||
parse_command_type
|
||||
|
||||
Reference in New Issue
Block a user