]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monc: handle mon0 or mon.a syntax when pull mon addrs from .conf
authorSage Weil <sage@newdream.net>
Fri, 11 Jun 2010 21:05:02 +0000 (14:05 -0700)
committerSage Weil <sage@newdream.net>
Fri, 11 Jun 2010 21:05:02 +0000 (14:05 -0700)
src/mon/MonClient.cc

index 944e0ea8d4020a194e10c1e389617b8fa1e4c979..143d134b53b96b1804761f88b6faee68a16a06d9 100644 (file)
@@ -83,8 +83,10 @@ int MonClient::build_initial_monmap()
             q != c.get_section_list().end();
             q++) {
          const char *section = (*q)->get_name().c_str();
-         if (strncmp(section, "mon.", 4) == 0) {
-           const char *name = section + 4;
+         if (strncmp(section, "mon", 3) == 0) {
+           const char *name = section + 3;
+           if (name[0] == '.')
+             name++;
            char *val = 0;
            c.read(section, "mon addr", &val, 0);
            if (!val || !val[0])