blob: eb92ab0b40c28157bcc65c536d7beb3c3faebe49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
--- orig-096/src/command_throttle.cc 2015-09-03 21:03:30.000000000 +0200
+++ rtorrent-0.9.6/src/command_throttle.cc 2017-04-27 05:17:31.000000000 +0200
@@ -98,8 +98,10 @@
+ if (argItr == args.end())
+ throw torrent::input_error("Missing throttle name.");
const std::string& name = argItr->as_string();
if (name.empty() || name == "NULL")
- throw torrent::input_error("Invalid throttle name.");
+ throw torrent::input_error("Invalid throttle name '" + name + "'.");
- if ((++argItr)->as_string().empty())
- return torrent::Object();
+ if (++argItr == args.end() || argItr->as_string().empty())
+ throw torrent::input_error("Missing throttle rate for '" + name + "'.");
|