From 79e9e046e63af939b5283f41909549247350bfa9 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Tue, 14 Feb 2023 14:37:30 +0000 Subject: [PATCH] crimson/osd: fix FTBFS due to smart-ptr-to-bool conversion in fmt::ptr MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ``` ../src/fmt/include/fmt/format.h: In instantiation of ‘const void* fmt::v9::ptr(T) [with T = seastar::shared_ptr]’: ../src/crimson/net/ProtocolV2.cc:1109:72: required from here ../src/fmt/include/fmt/format.h:3809:37: error: static assertion failed 3809 | static_assert(std::is_pointer::value, ""); | ^~~~~ ../src/fmt/include/fmt/format.h:3809:37: note: ‘std::integral_constant::value’ evaluates to false ``` Signed-off-by: Radoslaw Zarzynski --- src/crimson/net/ProtocolV2.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crimson/net/ProtocolV2.cc b/src/crimson/net/ProtocolV2.cc index e987205c1a8..482ee3bc84d 100644 --- a/src/crimson/net/ProtocolV2.cc +++ b/src/crimson/net/ProtocolV2.cc @@ -1097,7 +1097,7 @@ ProtocolV2::handle_existing_connection(SocketConnectionRef existing_conn) " found existing {}(state={}, gs={}, pgs={}, cs={}, cc={}, sc={})", conn, global_seq, peer_global_seq, connect_seq, client_cookie, server_cookie, - fmt::ptr(existing_conn), get_state_name(existing_proto->state), + fmt::ptr(existing_conn.get()), get_state_name(existing_proto->state), existing_proto->global_seq, existing_proto->peer_global_seq, existing_proto->connect_seq, @@ -1106,7 +1106,7 @@ ProtocolV2::handle_existing_connection(SocketConnectionRef existing_conn) if (!validate_peer_name(existing_conn->get_peer_name())) { logger().error("{} server_connect: my peer_name doesn't match" - " the existing connection {}, abort", conn, fmt::ptr(existing_conn)); + " the existing connection {}, abort", conn, fmt::ptr(existing_conn.get())); abort_in_fault(); } @@ -1362,7 +1362,7 @@ ProtocolV2::server_reconnect() " found existing {}(state={}, gs={}, pgs={}, cs={}, cc={}, sc={})", conn, global_seq, peer_global_seq, reconnect.connect_seq(), reconnect.client_cookie(), reconnect.server_cookie(), - fmt::ptr(existing_conn), + fmt::ptr(existing_conn.get()), get_state_name(existing_proto->state), existing_proto->global_seq, existing_proto->peer_global_seq, @@ -1372,7 +1372,7 @@ ProtocolV2::server_reconnect() if (!validate_peer_name(existing_conn->get_peer_name())) { logger().error("{} server_reconnect: my peer_name doesn't match" - " the existing connection {}, abort", conn, fmt::ptr(existing_conn)); + " the existing connection {}, abort", conn, fmt::ptr(existing_conn.get())); abort_in_fault(); } -- 2.39.5