aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-09-20 20:45:01 +0200
committerSven Gothel <[email protected]>2020-09-20 20:45:01 +0200
commit9226e18b2314dac7dfe197bcfbbf9cabf91c15ce (patch)
treee887cc7b6c7fa2fe332461373c4282d58848936a /api
parent908562af5082a77a7b610306f15512dc40019092 (diff)
GATT[Service,...] used a 'toSafeString()' due to unknown SIGSEGV at this time, rename to toShortString()
The SIGSEGV back then happened due to abusive non-weak backreference back to device, which already got destroyed at some point. Since this has been resolved, we rename the method to 'toShortString()' and remove the elaborated comment.
Diffstat (limited to 'api')
-rw-r--r--api/direct_bt/GATTCharacteristic.hpp10
-rw-r--r--api/direct_bt/GATTDescriptor.hpp10
-rw-r--r--api/direct_bt/GATTService.hpp10
3 files changed, 3 insertions, 27 deletions
diff --git a/api/direct_bt/GATTCharacteristic.hpp b/api/direct_bt/GATTCharacteristic.hpp
index 0cdc1713..bf9a90ed 100644
--- a/api/direct_bt/GATTCharacteristic.hpp
+++ b/api/direct_bt/GATTCharacteristic.hpp
@@ -81,15 +81,7 @@ namespace direct_bt {
bool enabledNotifyState = false;
bool enabledIndicateState = false;
- /**
- * For an unknown reason, using the virtual function 'toString()'
- * while constructing an exception message causes a SIGSEGV.
- * <p>
- * This method represents a non-virtual variation,
- * which also does not call any other virtual function.
- * </p>
- */
- std::string toSafeString() const noexcept;
+ std::string toShortString() const noexcept;
public:
/** BT Core Spec v5.2: Vol 3, Part G GATT: 3.3.1.1 Characteristic Properties */
diff --git a/api/direct_bt/GATTDescriptor.hpp b/api/direct_bt/GATTDescriptor.hpp
index a9a6407b..8ddf7603 100644
--- a/api/direct_bt/GATTDescriptor.hpp
+++ b/api/direct_bt/GATTDescriptor.hpp
@@ -65,15 +65,7 @@ namespace direct_bt {
/** Descriptor's characteristic weak back-reference */
std::weak_ptr<GATTCharacteristic> wbr_characteristic;
- /**
- * For an unknown reason, using the virtual function 'toString()'
- * while constructing an exception message causes a SIGSEGV.
- * <p>
- * This method represents a non-virtual variation,
- * which also does not call any other virtual function.
- * </p>
- */
- std::string toSafeString() const noexcept;
+ std::string toShortString() const noexcept;
public:
static const uuid16_t TYPE_EXT_PROP;
diff --git a/api/direct_bt/GATTService.hpp b/api/direct_bt/GATTService.hpp
index 387ef1a1..b293f90a 100644
--- a/api/direct_bt/GATTService.hpp
+++ b/api/direct_bt/GATTService.hpp
@@ -69,15 +69,7 @@ namespace direct_bt {
/** Service's GATTHandler weak back-reference */
std::weak_ptr<GATTHandler> wbr_handler;
- /**
- * For an unknown reason, using the virtual function 'toString()'
- * while constructing an exception message causes a SIGSEGV.
- * <p>
- * This method represents a non-virtual variation,
- * which also does not call any other virtual function.
- * </p>
- */
- std::string toSafeString() const noexcept;
+ std::string toShortString() const noexcept;
public:
const bool isPrimary;