aboutsummaryrefslogtreecommitdiffstats
path: root/api/direct_bt/BTDevice.hpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-02-01 16:36:59 +0100
committerSven Gothel <[email protected]>2021-02-01 16:36:59 +0100
commitfe3caaf19c429a2fda0a747603e46c39dde4716c (patch)
tree393af70d6022b1d4be51c842e117e437a90e0926 /api/direct_bt/BTDevice.hpp
parentb59336ba412fb61046d7f896320b26e797d834e4 (diff)
DBTDevice.hpp/cpp: Remove const_cast on now explicit mutable mutex and atomic-sync members in const methods.
Diffstat (limited to 'api/direct_bt/BTDevice.hpp')
-rw-r--r--api/direct_bt/BTDevice.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/api/direct_bt/BTDevice.hpp b/api/direct_bt/BTDevice.hpp
index ae12e33b..f48fee8d 100644
--- a/api/direct_bt/BTDevice.hpp
+++ b/api/direct_bt/BTDevice.hpp
@@ -75,9 +75,9 @@ namespace direct_bt {
std::recursive_mutex mtx_smpHandler;
#endif
std::shared_ptr<BTGattHandler> gattHandler = nullptr;
- std::recursive_mutex mtx_gattHandler;
- std::recursive_mutex mtx_connect;
- std::recursive_mutex mtx_data;
+ mutable std::recursive_mutex mtx_gattHandler;
+ mutable std::recursive_mutex mtx_connect;
+ mutable std::recursive_mutex mtx_data;
std::atomic<bool> isConnected;
std::atomic<bool> allowDisconnect; // allowDisconnect = isConnected || 'isConnectIssued'
@@ -111,8 +111,8 @@ namespace direct_bt {
SMPSignatureResolvingKeyInfo csrk_init, csrk_resp;
};
PairingData pairing_data;
- std::mutex mtx_pairing;
- jau::sc_atomic_bool sync_pairing;
+ mutable std::mutex mtx_pairing;
+ mutable jau::sc_atomic_bool sync_pairing;
/** Private class only for private make_shared(). */
class ctor_cookie { friend BTDevice; ctor_cookie(const uint16_t secret) { (void)secret; } };