struct AsyncResponse : Context {
Formatter* f;
decltype(on_finish) do_respond;
- std::basic_ostringstream<char> css;
+ std::basic_ostringstream<char> ss;
AsyncResponse(Formatter* f, decltype(on_finish)&& respond_action)
: f(f), do_respond(std::forward<decltype(on_finish)>(respond_action)) {}
void finish(int rc) override {
f->open_object_section("result");
- if (!css.view().empty()) {
- f->dump_string("message", css.view());
- }
+ if (!ss.view().empty()) {
+ f->dump_string("message", ss.view());
f->dump_int("return_code", rc);
f->close_section();
return;
} else if (command == "flush journal") {
auto respond = new AsyncResponse(f, std::move(on_finish));
- C_Flush_Journal* flush_journal = new C_Flush_Journal(mdcache, mdlog, this, &respond->css, respond);
+ C_Flush_Journal* flush_journal = new C_Flush_Journal(mdcache, mdlog, this, &respond->ss, respond);
std::lock_guard locker(mds_lock);
flush_journal->send();