]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monclient: use default port if not specified via -m
authorSage Weil <sage@newdream.net>
Thu, 29 Jul 2010 22:49:27 +0000 (15:49 -0700)
committerSage Weil <sage@newdream.net>
Thu, 29 Jul 2010 22:49:27 +0000 (15:49 -0700)
Reported-by: Thomas Mueller <thomas@chaschperli.ch>
Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/MonClient.cc

index e0e798ef704e216452e93664d8586586ce01800e..0bf844b90654fa65019202b0556ad9141f912f07 100644 (file)
@@ -64,6 +64,8 @@ int MonClient::build_initial_monmap()
        char n[2];
        n[0] = 'a' + i;
        n[1] = 0;
+       if (addrs[i].get_port() == 0)
+         addrs[i].set_port(CEPH_MON_PORT);
        monmap.add(n, addrs[i]);
       }
       return 0;