]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: print entity_addr_t not the in4_addr in it
authorKefu Chai <kchai@redhat.com>
Wed, 9 Sep 2020 02:24:09 +0000 (10:24 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 9 Sep 2020 05:27:25 +0000 (13:27 +0800)
for two reasons:

* we don't have operator<<(ostream&, in4_addr&) defined.
* we don't have any fmt::format() facility specialized for in4_addr
* to print entity_addr_t instead of in4_addr is more correct in
  the sense that we should support IPv6

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/net/SocketMessenger.cc

index 7dc1e8969517ce43ebd503055e842a72919fe573..11914d71bd3d1951cab9814b554ff5d71a761f26 100644 (file)
@@ -62,8 +62,8 @@ seastar::future<> SocketMessenger::do_bind(const entity_addrvec_t& addrs)
       return seastar::now();
     }
   }).then([this] {
-    auto listen_addr = get_myaddr();
-    logger().debug("{} do_bind: try listen {}...", *this, listen_addr.in4_addr());
+    const entity_addr_t listen_addr = get_myaddr();
+    logger().debug("{} do_bind: try listen {}...", *this, listen_addr);
     if (!listener) {
       logger().warn("{} do_bind: listener doesn't exist", *this);
       return seastar::now();