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.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/session.hpp') diff --git a/src/session.hpp b/src/session.hpp index c3aecc1..1669964 100644 --- a/src/session.hpp +++ b/src/session.hpp @@ -24,7 +24,7 @@ class CSession { const std::string &getName() const; const std::string &getIp() const; - void setSelf(std::unique_ptr>> self); + void setSelf(std::pair> *self); std::unique_ptr read(); std::unique_ptr read(const std::string &msg, bool bypassDeaf = false); @@ -52,14 +52,14 @@ class CSession { WRITE }; - std::unique_ptr>> self; - Hyprutils::OS::CFileDescriptor m_sockfd; - sockaddr_in m_addr; - socklen_t m_addrLen = sizeof(m_addr); - std::string m_name; - std::string m_ip; - int m_port; - bool m_isAdmin = false; + std::pair> *self; + Hyprutils::OS::CFileDescriptor m_sockfd; + sockaddr_in m_addr; + socklen_t m_addrLen = sizeof(m_addr); + std::string m_name; + std::string m_ip; + int m_port; + bool m_isAdmin = false; bool m_isReading = false; bool m_bMuted = false; -- cgit v1.2.3