From 9e3a7d5238d1b1c7a00e457f67a8108108909f01 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 20 May 2025 19:00:37 +0800 Subject: Revert "internal: use smart pointer for everything, no more naked pointer" This reverts commit 72cf95bc9b1eb338457a0815eb1fe4f70b42ebb3. segfault/IOT instruct on client exit... --- src/session.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/session.cpp') diff --git a/src/session.cpp b/src/session.cpp index 8167a91..2814c41 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -151,7 +151,7 @@ void CSession::run() { } else log(LOG, "Client {} exited without even registering", m_ip); - g_pSessionManager->kick(std::move(self)); + g_pSessionManager->kick(self); } bool CSession::isMuted() const { @@ -266,6 +266,6 @@ const std::string &CSession::getIp() const { return m_ip; } -void CSession::setSelf(std::unique_ptr>> self) { - this->self = std::move(self); +void CSession::setSelf(std::pair> *self) { + this->self = self; } -- cgit v1.2.3