aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-06-25 01:49:16 +0200
committerSven Gothel <[email protected]>2020-06-25 01:49:16 +0200
commita78965ca7904574e259672e0ae50bbb932343f29 (patch)
tree6b0a53b474654b297d1871d2ce506a07f87baf93 /api
parentd216c80596bd662087f47d275f2fc302e4061abc (diff)
GATTHandler: Add mtx_command for all public accessible functions, ensuring sequential processing is ensured
GATTHandler servers one device, however, applications may utilize multithreading and concurrent command requests may lead to wrong replies. Similar to DBTManager and HCIHandler, top-level entries shall be synchronized.
Diffstat (limited to 'api')
-rw-r--r--api/direct_bt/GATTHandler.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/direct_bt/GATTHandler.hpp b/api/direct_bt/GATTHandler.hpp
index 92a79c38..4652a4f2 100644
--- a/api/direct_bt/GATTHandler.hpp
+++ b/api/direct_bt/GATTHandler.hpp
@@ -85,6 +85,7 @@ namespace direct_bt {
std::shared_ptr<DBTDevice> device;
const std::string deviceString;
std::recursive_mutex mtx_write;
+ std::recursive_mutex mtx_command;
POctets rbuffer;
L2CAPComm l2cap;