summarylogtreecommitdiffstats
path: root/ps-fix-throttle-args_all.patch
diff options
context:
space:
mode:
authorxsmile2017-04-28 23:53:16 +0000
committerxsmile2017-04-28 23:53:16 +0000
commit5da0b50ee5e0497d988f0bc8db268b3c6206a205 (patch)
treebce767237592faeb0ced99e82b9c0465a600e259 /ps-fix-throttle-args_all.patch
parentf5c0bd9fd68574b4fde920898ca16f8ee4514b7a (diff)
downloadaur-5da0b50ee5e0497d988f0bc8db268b3c6206a205.tar.gz
update
Diffstat (limited to 'ps-fix-throttle-args_all.patch')
-rw-r--r--ps-fix-throttle-args_all.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/ps-fix-throttle-args_all.patch b/ps-fix-throttle-args_all.patch
new file mode 100644
index 000000000000..eb92ab0b40c2
--- /dev/null
+++ b/ps-fix-throttle-args_all.patch
@@ -0,0 +1,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 + "'.");
+