]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix pgmonitor ratio commands
authorGreg Farnum <gregory.farnum@dreamhost.com>
Tue, 24 Apr 2012 17:30:43 +0000 (10:30 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Tue, 24 Apr 2012 17:35:32 +0000 (10:35 -0700)
The indices were set incorrectly when I whipped thi sup. That's what
you get for not testing nor being careful enough in review.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mon/PGMonitor.cc

index e65e6825c6d80a4e6c1e0718dd3b0d08c4e7c90a..e80f727c8fc82d936158cfbd932dc25cc4c914a8 100644 (file)
@@ -1072,7 +1072,7 @@ bool PGMonitor::prepare_command(MMonCommand *m)
       ss << "set_full_ratio takes exactly one argument: the new full ratio";
       goto out;
     }
-    const char *start = m->cmd[1].c_str();
+    const char *start = m->cmd[2].c_str();
     char *end = (char *)start;
     float n = strtof(start, &end);
     if (*end != '\0') { // conversion didn't work
@@ -1088,7 +1088,7 @@ bool PGMonitor::prepare_command(MMonCommand *m)
       ss << "set_nearfull_ratio takes exactly one argument: the new nearfull ratio";
       goto out;
     }
-    const char *start = m->cmd[1].c_str();
+    const char *start = m->cmd[2].c_str();
     char *end = (char *)start;
     float n = strtof(start, &end);
     if (*end != '\0') { // conversion didn't work