]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
json formatter: reset pending string on dump_stream() 23298/head
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 13 Dec 2018 13:34:13 +0000 (05:34 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 13 Dec 2018 13:34:13 +0000 (05:34 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/common/Formatter.cc

index 703322e8a0b75c0477a42a5a9e5ea74b432d296b..8f199ef7a7b2950045d6050e5dd951229f26ccad 100644 (file)
@@ -303,6 +303,7 @@ void JSONFormatter::dump_string(const char *name, std::string_view s)
 
 std::ostream& JSONFormatter::dump_stream(const char *name)
 {
+  finish_pending_string();
   m_pending_name = name;
   m_is_pending_string = true;
   return m_pending_string;