mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-07 02:32:32 +00:00
* 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
This commit is contained in:
@@ -122,7 +122,7 @@ apply_on_ratio(const torrent::Object& rawArgs) {
|
||||
if (!(*itr)->is_seeding() || rpc::call_command_value("d.get_ignore_commands", rpc::make_target(*itr)) != 0)
|
||||
continue;
|
||||
|
||||
rpc::parse_command_single(rpc::make_target(*itr), "print={Checked ratio of download.}");
|
||||
// rpc::parse_command_single(rpc::make_target(*itr), "print={Checked ratio of download.}");
|
||||
|
||||
int64_t totalDone = (*itr)->download()->bytes_done();
|
||||
int64_t totalUpload = (*itr)->download()->up_rate()->total();
|
||||
@@ -137,7 +137,7 @@ apply_on_ratio(const torrent::Object& rawArgs) {
|
||||
std::strcpy(bufferStart, "command");
|
||||
|
||||
for (std::vector<core::Download*>::iterator itr = downloads.begin(), last = downloads.end(); itr != last; itr++) {
|
||||
rpc::commands.call("print", rpc::make_target(*itr), "Calling ratio command.");
|
||||
// rpc::commands.call("print", rpc::make_target(*itr), "Calling ratio command.");
|
||||
rpc::commands.call_catch(buffer, rpc::make_target(*itr), torrent::Object(), "Ratio reached, but command failed: ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user