From ce8b544b987cd86f64ef415d1cef77baf806a524 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 9 Sep 2020 10:24:09 +0800 Subject: [PATCH] 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 --- src/crimson/net/SocketMessenger.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crimson/net/SocketMessenger.cc b/src/crimson/net/SocketMessenger.cc index 7dc1e8969517c..11914d71bd3d1 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(); -- 2.39.5