File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 - name : Build
5454 run : |
5555 rm -rf build
56- cmake -B build . -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON -DENABLE_ASAN=ON -DBUILD_EXECUTABLE=OFF
56+ cmake -B build . -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON -DENABLE_ASAN=OFF -DBUILD_EXECUTABLE=OFF
5757 cmake --build build
5858 cd build && ctest --output-on-failure --verbose
5959
Original file line number Diff line number Diff line change @@ -24,10 +24,7 @@ class NoiseService
2424{
2525public:
2626 NoiseService ();
27- ~NoiseService ();
28-
29- // Cleanup method
30- void cleanup ();
27+ ~NoiseService () = default ;
3128
3229 // Session management
3330 std::shared_ptr<NoiseSession> createSession (const std::string &peerID, NoiseRole role);
Original file line number Diff line number Diff line change 22#include " bitchat/core/constants.h"
33#include " bitchat/helpers/noise_helper.h"
44#include " bitchat/noise/noise_session_default.h"
5- #include < openssl/err.h>
6- #include < openssl/evp.h>
75#include < openssl/rand.h>
86#include < spdlog/spdlog.h>
97
@@ -18,30 +16,6 @@ NoiseService::NoiseService()
1816 }
1917}
2018
21- NoiseService::~NoiseService ()
22- {
23- cleanup ();
24- }
25-
26- void NoiseService::cleanup ()
27- {
28- std::lock_guard<std::mutex> lock (sessionsMutex);
29-
30- // Clear all sessions
31- sessions.clear ();
32-
33- // Clear OpenSSL
34- CRYPTO_set_locking_callback (nullptr );
35- CRYPTO_set_id_callback (nullptr );
36-
37- ERR_remove_state (0 );
38-
39- ERR_free_strings ();
40- EVP_cleanup ();
41-
42- CRYPTO_cleanup_all_ex_data ();
43- }
44-
4519std::shared_ptr<NoiseSession> NoiseService::createSession (const std::string &peerID, NoiseRole role)
4620{
4721 std::lock_guard<std::mutex> lock (sessionsMutex);
You can’t perform that action at this time.
0 commit comments