From 3d019b8dc192dc7a2eff198fa962d52f6bdc3134 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 3 Nov 2018 22:47:54 +0100 Subject: Fix crash when posting message after creating room --- include/dchat/Gif.hpp | 1 + include/dchat/Room.hpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include/dchat') diff --git a/include/dchat/Gif.hpp b/include/dchat/Gif.hpp index 9e39473..c870d1c 100644 --- a/include/dchat/Gif.hpp +++ b/include/dchat/Gif.hpp @@ -19,6 +19,7 @@ namespace dchat GifLoadException(const std::string &errMsg) : std::runtime_error(errMsg) {} }; + // Gif is in image format ARGB (32-bits in total) class Gif { public: diff --git a/include/dchat/Room.hpp b/include/dchat/Room.hpp index 4938aea..5dd0e3f 100644 --- a/include/dchat/Room.hpp +++ b/include/dchat/Room.hpp @@ -8,6 +8,7 @@ #include #include #include +#include #include namespace dchat @@ -26,7 +27,7 @@ namespace dchat { DISABLE_COPY(Room) public: - Room(Rooms *rooms, std::shared_ptr id, std::shared_ptr encryptionKey); + Room(Rooms *rooms, std::shared_ptr id); std::shared_ptr addUser(const odhtdb::Signature::PublicKey &userPublicKey, const odhtdb::DataView groupId); // Returns null if user doesn't exist in room std::shared_ptr getUserByPublicKey(const odhtdb::Signature::PublicKey &userPublicKey); @@ -114,5 +115,6 @@ namespace dchat std::string currentUsername; std::string currentUserPassword; + std::recursive_mutex roomModifyMutex; }; } \ No newline at end of file -- cgit v1.2.3