From: Patrick Donnelly Date: Tue, 22 Jul 2025 02:50:47 +0000 (-0400) Subject: msg: constify getter X-Git-Tag: testing/wip-pdonnell-testing-20260126.152838~36 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=35ec9707753fe3c1fb8b5da28b25b787da749501;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 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;