From: Kefu Chai Date: Wed, 9 Sep 2020 02:24:09 +0000 (+0800) Subject: crimson/net: print entity_addr_t not the in4_addr in it X-Git-Tag: v16.1.0~1157^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ce8b544b987cd86f64ef415d1cef77baf806a524;p=ceph.git crimson/net: print entity_addr_t not the in4_addr in it 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 --- diff --git a/src/crimson/net/SocketMessenger.cc b/src/crimson/net/SocketMessenger.cc index 7dc1e8969517..11914d71bd3d 100644 --- a/src/crimson/net/SocketMessenger.cc +++ b/src/crimson/net/SocketMessenger.cc @@ -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();