mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 13:12:32 +00:00
* 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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user