summarylogtreecommitdiffstats
path: root/ps-object_std-map-serialization_all.patch
diff options
context:
space:
mode:
Diffstat (limited to 'ps-object_std-map-serialization_all.patch')
-rw-r--r--ps-object_std-map-serialization_all.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/ps-object_std-map-serialization_all.patch b/ps-object_std-map-serialization_all.patch
new file mode 100644
index 000000000000..b476f84cd700
--- /dev/null
+++ b/ps-object_std-map-serialization_all.patch
@@ -0,0 +1,24 @@
+--- a/src/rpc/parse.cc
++++ b/src/rpc/parse.cc
+@@ -506,6 +506,21 @@ print_object_std(std::string* dest, const torrent::Object* src, int flags) {
+
+ return;
+
++ case torrent::Object::TYPE_MAP:
++ {
++ bool first = true;
++ for (torrent::Object::map_const_iterator itr = src->as_map().begin(), itrEnd = src->as_map().end(); itr != itrEnd; itr++) {
++ if (!first) *dest += ", ";
++ *dest += itr->first;
++ *dest += ": \"";
++ print_object_std(dest, &(itr->second), flags);
++ *dest += '"';
++ first = false;
++ }
++
++ return;
++ }
++
+ case torrent::Object::TYPE_NONE:
+ return;
+ default: