From: Sage Weil Date: Sat, 25 Feb 2017 03:20:13 +0000 (-0500) Subject: mgr/DaemonServer: use stringstream ds in local scope X-Git-Tag: v12.0.2~252^2~60 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=268d08dd305cc2cfd26d6247d2f14d236b6b7e17;p=ceph.git mgr/DaemonServer: use stringstream ds in local scope Signed-off-by: Sage Weil --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index f130d53a12e0..7d2e2abb2aff 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -267,7 +267,6 @@ bool DaemonServer::handle_command(MCommand *m) { int r = 0; std::stringstream ss; - std::stringstream ds; bufferlist odata; std::string prefix; @@ -328,8 +327,6 @@ bool DaemonServer::handle_command(MCommand *m) } #endif f.close_section(); // command_descriptions - - f.flush(ds); goto out; } else { // Let's find you a handler! @@ -355,7 +352,9 @@ bool DaemonServer::handle_command(MCommand *m) // with a ms_dispatch, so that the python part can block if it // wants to. dout(4) << "passing through " << cmdmap.size() << dendl; + stringstream ds; r = handler->handle_command(cmdmap, &ds, &ss); + odata.append(ds); goto out; } @@ -368,7 +367,6 @@ bool DaemonServer::handle_command(MCommand *m) std::string rs; rs = ss.str(); - odata.append(ds); dout(1) << "do_command r=" << r << " " << rs << dendl; if (con) { MCommandReply *reply = new MCommandReply(r, rs);