]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/ConfigMonitor: add missing #include, tweak types
authorSage Weil <sage@redhat.com>
Mon, 19 Feb 2018 15:00:24 +0000 (09:00 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Mar 2018 20:44:50 +0000 (14:44 -0600)
Seems to resolve a build error on some compilers!  Meh.

Signed-off-by: Sage Weil <sage@redhat.com>
src/messages/MMonCommand.h
src/mon/ConfigMonitor.cc

index a0b263c8d49f72692f726bb34d1544dd242747a8..2f58343107fe2546a34bfb31a6652384635b0730 100644 (file)
 #include "messages/PaxosServiceMessage.h"
 
 #include <vector>
-using std::vector;
+#include <string>
 
 class MMonCommand : public PaxosServiceMessage {
  public:
   uuid_d fsid;
-  vector<string> cmd;
+  std::vector<std::string> cmd;
 
   MMonCommand() : PaxosServiceMessage(MSG_MON_COMMAND, 0) {}
   MMonCommand(const uuid_d &f)
index 5a260ab571dfed72d668a1ebc7d2af6acfde9b2e..a79149ab1bfe788a2d68cb3a1d410ab138826794 100644 (file)
@@ -9,6 +9,7 @@
 #include "messages/MMonCommand.h"
 #include "common/Formatter.h"
 #include "common/TextTable.h"
+#include "common/cmdparse.h"
 #include "include/stringify.h"
 
 #define dout_subsys ceph_subsys_mon
@@ -105,10 +106,10 @@ static string indent_who(const string& who)
 bool ConfigMonitor::preprocess_command(MonOpRequestRef op)
 {
   MMonCommand *m = static_cast<MMonCommand*>(op->get_req());
-  stringstream ss;
+  std::stringstream ss;
   int err = 0;
 
-  map<string, cmd_vartype> cmdmap;
+  cmdmap_t cmdmap;
   if (!cmdmap_from_json(m->cmd, &cmdmap, ss)) {
     string rs = ss.str();
     mon->reply_command(op, -EINVAL, rs, get_last_committed());
@@ -327,10 +328,10 @@ bool ConfigMonitor::prepare_update(MonOpRequestRef op)
 bool ConfigMonitor::prepare_command(MonOpRequestRef op)
 {
   MMonCommand *m = static_cast<MMonCommand*>(op->get_req());
-  stringstream ss;
+  std::stringstream ss;
   int err = -EINVAL;
 
-  map<string, cmd_vartype> cmdmap;
+  cmdmap_t cmdmap;
   if (!cmdmap_from_json(m->cmd, &cmdmap, ss)) {
     string rs = ss.str();
     mon->reply_command(op, -EINVAL, rs, get_last_committed());