mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-07 02:32:32 +00:00
* Added a default low_diskspace check for 500MB.
* Properly catch the exceptions being thrown by the 'in_*' events. * Expand ~ in ExecFile. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@950 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -62,18 +62,18 @@ torrent::Object
|
||||
apply_on_state_change(core::DownloadList::slot_map* slotMap, const torrent::Object& rawArgs) {
|
||||
const torrent::Object::list_type& args = rawArgs.as_list();
|
||||
|
||||
if (args.size() < 2)
|
||||
throw torrent::input_error("Too few arguments.");
|
||||
if (args.size() == 0 || args.size() > 2)
|
||||
throw torrent::input_error("Wrong number of arguments.");
|
||||
|
||||
if (args.front().as_string().empty())
|
||||
throw torrent::input_error("Empty key.");
|
||||
|
||||
std::string key = "1_state_" + args.front().as_string();
|
||||
|
||||
if (args.back().as_string().empty())
|
||||
if (args.size() == 1)
|
||||
slotMap->erase(key);
|
||||
else
|
||||
(*slotMap)[key] = sigc::bind(sigc::ptr_fun(&rpc::parse_command_d_multiple_std), rpc::convert_list_to_command(++args.begin(), args.end()));
|
||||
(*slotMap)[key] = sigc::bind(sigc::ptr_fun(&rpc::parse_command_d_multiple_std), args.back().as_string());
|
||||
|
||||
return torrent::Object();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user