From: Patrick Donnelly Date: Tue, 22 Jul 2025 02:50:47 +0000 (-0400) Subject: msg: constify getter X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=da54f36e14b4be42fe3c30f80bca256d4866659f;p=ceph-ci.git msg: constify getter Signed-off-by: Patrick Donnelly --- 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 f18b26d2906..4d9c79cd7ff 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -6728,7 +6728,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 5e8ef8927cd..91063a483be 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7779,7 +7779,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;