* Proper fault handling for bad SCGI requests.

* Cleaned up duplicate code in 'xmlrpc.cc'.

* Cleaned up 'parse_commands.h'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@966 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-08-27 23:00:48 +00:00
parent 02b790c0bf
commit 32b74ffc48
19 changed files with 161 additions and 191 deletions
+6 -1
View File
@@ -73,6 +73,8 @@ struct command_map_data_type {
command_map_data_type(Command* variable, int flags, const char* parm, const char* doc) :
m_variable(variable), m_flags(flags), m_parm(parm), m_doc(doc) {}
int target() const { return m_target; }
Command* m_variable;
union {
@@ -104,6 +106,7 @@ public:
typedef mapped_type::value_type mapped_value_type;
using base_type::iterator;
using base_type::const_iterator;
using base_type::key_type;
using base_type::value_type;
@@ -138,7 +141,9 @@ public:
void insert(key_type key, const command_map_data_type src);
const mapped_type call_command (key_type key, const mapped_type& arg, target_type target = target_type((int)target_generic, NULL));
const mapped_type call_command (key_type key, const mapped_type& arg, target_type target = target_type((int)target_generic, NULL));
const mapped_type call_command (const_iterator itr, const mapped_type& arg, target_type target = target_type((int)target_generic, NULL));
const mapped_type call_command_d(key_type key, core::Download* download, const mapped_type& arg) { return call_command(key, arg, target_type((int)target_download, download)); }
const mapped_type call_command_f(key_type key, torrent::File* file, const mapped_type& arg) { return call_command(key, arg, target_type((int)target_file, file)); }
const mapped_type call_command_p(key_type key, torrent::Peer* peer, const mapped_type& arg) { return call_command(key, arg, target_type((int)target_peer, peer)); }