* Allow returning torrent::Object map type's with XMLRPC. Patch by Josef Drexler.

* Commands that pass through rpc::parse_command_* now support inline
commands that start with a '$'. E.g 'print="$get_ip="'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@933 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-07-10 13:14:42 +00:00
parent 2eaa34d989
commit 36251a46bf
5 changed files with 41 additions and 45 deletions
+11
View File
@@ -257,6 +257,17 @@ object_to_xmlrpc(xmlrpc_env* env, const torrent::Object& object) {
return result;
}
case torrent::Object::TYPE_MAP:
{
xmlrpc_value* result = xmlrpc_struct_new(env);
for (torrent::Object::map_type::const_iterator itr = object.as_map().begin(), last = object.as_map().end(); itr != last; itr++)
xmlrpc_struct_set_value(env, result, itr->first.c_str(), object_to_xmlrpc(env, itr->second));
return result;
}
default:
return xmlrpc_int_new(env, 0);
}