]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/MonMap: kill dead msgr type checking
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 15 Mar 2019 08:07:14 +0000 (16:07 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 15 Mar 2019 08:07:14 +0000 (16:07 +0800)
which is unreachable.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/MonMap.cc

index 20d956141bd00f650e9c8174367e76913fd38782..ab99b50ac675dada3d3ab22850be43d120f1045c 100644 (file)
@@ -363,9 +363,7 @@ void MonMap::_add_ambiguous_addr(const string& name,
     // a v1: or v2: prefix was specified
     if (addr.get_port() == 0) {
       // use default port
-      if (addr.get_type() == entity_addr_t::TYPE_ANY) {
-       addr.set_port(CEPH_MON_PORT_IANA);
-      } else if (addr.get_type() == entity_addr_t::TYPE_LEGACY) {
+      if (addr.get_type() == entity_addr_t::TYPE_LEGACY) {
        addr.set_port(CEPH_MON_PORT_LEGACY);
       } else if (addr.get_type() == entity_addr_t::TYPE_MSGR2) {
        addr.set_port(CEPH_MON_PORT_IANA);