f->close_section(); /* auth_entities */
}
f->close_section(); /* auth_dump */
- f->flush(os);
- bl.append(os.str());
+ f->flush(bl);
}
void KeyRing::decode_plaintext(bufferlist::iterator& bli)
else
assert(0 == "bad command registered");
m_client->client_lock.Unlock();
- f->flush(ss);
- out.append(ss);
+ f->flush(out);
delete f;
return true;
}
} else if (prefix == "auth list") {
if (f) {
mon->key_server.encode_formatted("auth", f.get(), rdata);
- f->flush(rdata);
} else {
mon->key_server.encode_plaintext(rdata);
if (rdata.length() > 0)
f->close_section(); // command_descriptions
bufferlist rdata;
- f->flush(ds);
+ f->flush(rdata);
delete f;
- rdata.append(ds);
reply_command(m, 0, "", rdata, 0);
return;
}
}
if (prefix == "fsid") {
- ds << monmap->fsid;
if (f) {
f->open_object_section("fsid");
f->dump_stream("fsid") << monmap->fsid;
f->close_section();
f->flush(rdata);
} else {
+ ds << monmap->fsid;
rdata.append(ds);
}
reply_command(m, 0, "", rdata, 0);
if (prefix == "osd stat") {
osdmap.print_summary(f.get(), ds);
if (f)
- f->flush(ds);
- rdata.append(ds);
+ f->flush(rdata);
+ else
+ rdata.append(ds);
}
else if (prefix == "osd dump" ||
prefix == "osd tree" ||
f->dump_string(p->first.c_str(), p->second);
f->close_section();
f->close_section();
- f->flush(ds);
- ds << "\n";
- rdata.append(ds);
+ f->flush(rdata);
} else if (prefix == "osd map") {
string poolstr, objstr, namespacestr;
cmd_getval(g_ceph_context, cmdmap, "pool", poolstr);
} else {
ds << pg_map;
}
- rdata.append(ds);
r = 0;
} else if (prefix == "pg getmap") {
pg_map.encode(rdata);
f->close_section(); // command_descriptions
f->flush(ds);
- odata.append(ds);
delete f;
goto out;
}
m_objecter->client_lock.Lock();
m_objecter->dump_requests(f);
m_objecter->client_lock.Unlock();
- f->flush(ss);
+ f->flush(out);
delete f;
- out.append(ss);
return true;
}