* Old file/tracker related xmlrpc commands now work as before.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1163 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-04-12 03:37:07 +00:00
parent 74bae32243
commit 575cafc7a8
9 changed files with 97 additions and 63 deletions
+4 -1
View File
@@ -88,11 +88,14 @@ public:
static const int flag_dont_delete = 0x1;
static const int flag_delete_key = 0x2;
static const int flag_public_xmlrpc = 0x4;
static const int flag_no_target = 0x8;
static const int flag_modifiable = 0x10;
static const int flag_is_redirect = 0x20;
static const int flag_has_redirects = 0x40;
static const int flag_no_target = 0x100;
static const int flag_file_target = 0x200;
static const int flag_tracker_target = 0x400;
CommandMap() {}
~CommandMap();
+4
View File
@@ -445,6 +445,10 @@ xmlrpc_call_command(xmlrpc_env* env, xmlrpc_value* args, void* voidServerInfo) {
if (itr->second.m_flags & CommandMap::flag_no_target)
xmlrpc_to_object(env, args, XmlRpc::call_generic, &target).swap(object);
else if (itr->second.m_flags & CommandMap::flag_file_target)
xmlrpc_to_object(env, args, XmlRpc::call_file, &target).swap(object);
else if (itr->second.m_flags & CommandMap::flag_tracker_target)
xmlrpc_to_object(env, args, XmlRpc::call_tracker, &target).swap(object);
else
xmlrpc_to_object(env, args, XmlRpc::call_any, &target).swap(object);