From 35ec9707753fe3c1fb8b5da28b25b787da749501 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 21 Jul 2025 22:50:47 -0400 Subject: [PATCH] msg: constify getter Signed-off-by: Patrick Donnelly --- src/mgr/DaemonServer.cc | 2 +- src/mon/Monitor.cc | 2 +- src/msg/Connection.h | 2 +- src/osd/OSD.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 3b657c57ffe..09fdf110165 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -286,7 +286,7 @@ bool DaemonServer::ms_handle_fast_authentication(Connection *con) << " addr " << con->get_peer_addrs() << dendl; - AuthCapsInfo &caps_info = con->get_peer_caps_info(); + auto& caps_info = con->get_peer_caps_info(); if (caps_info.allow_all) { dout(10) << " session " << s << " " << s->entity_name << " allow_all" << dendl; diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 3232f4097b1..a41b72095e6 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -6748,7 +6748,7 @@ bool Monitor::ms_handle_fast_authentication(Connection *con) << " addr " << s->con->get_peer_addr() << " " << *s << dendl; - AuthCapsInfo &caps_info = con->get_peer_caps_info(); + auto& caps_info = con->get_peer_caps_info(); if (caps_info.allow_all) { s->caps.set_allow_all(); s->authenticated = true; diff --git a/src/msg/Connection.h b/src/msg/Connection.h index ce167343711..ccdfb4d2747 100644 --- a/src/msg/Connection.h +++ b/src/msg/Connection.h @@ -165,7 +165,7 @@ public: virtual void shutdown() = 0; // WARNING / FIXME: this is not populated for loopback connections - AuthCapsInfo& get_peer_caps_info() { + AuthCapsInfo const& get_peer_caps_info() const { return peer_caps_info; } const EntityName& get_peer_entity_name() { diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 4de408d146f..82028d2b093 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7786,7 +7786,7 @@ bool OSD::ms_handle_fast_authentication(Connection *con) << " addr " << con->get_peer_addrs() << dendl; } - AuthCapsInfo &caps_info = con->get_peer_caps_info(); + auto& caps_info = con->get_peer_caps_info(); if (caps_info.allow_all) { s->caps.set_allow_all(); return true; -- 2.47.3