* 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:
rakshasa
2007-08-07 15:14:57 +00:00
parent 37bc4c85c4
commit ef794b8eda
9 changed files with 62 additions and 22 deletions
+4 -4
View File
@@ -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();
}