diff options
author | Sven Gothel <[email protected]> | 2020-06-01 06:16:22 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-06-01 06:16:22 +0200 |
commit | e462d079db0a3f77a631016a557cfceea3506307 (patch) | |
tree | e10baa732467e028951e497896f5101607486d2f /api | |
parent | 21974d4ac351522e6deb79231d2244d9bb0f5a88 (diff) |
DisconnectedEvent: Show both reasons, hci and mgmt
Diffstat (limited to 'api')
-rw-r--r-- | api/direct_bt/MgmtTypes.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api/direct_bt/MgmtTypes.hpp b/api/direct_bt/MgmtTypes.hpp index 3947505c..818cf5e8 100644 --- a/api/direct_bt/MgmtTypes.hpp +++ b/api/direct_bt/MgmtTypes.hpp @@ -942,10 +942,12 @@ namespace direct_bt { protected: std::string baseString() const override { - const HCIErrorCode reason = getHCIReason(); + const DisconnectReason reason1 = getReason(); + const HCIErrorCode reason2 = getHCIReason(); return MgmtEvent::baseString()+", address="+getAddress().toString()+ ", addressType "+getBDAddressTypeString(getAddressType())+ - ", reason "+uint8HexString(static_cast<uint8_t>(reason))+" ("+getHCIErrorCodeString(reason)+")"; + ", reason[mgmt["+uint8HexString(static_cast<uint8_t>(reason1))+" ("+getDisconnectReasonString(reason1)+")]"+ + ", hci["+uint8HexString(static_cast<uint8_t>(reason2))+" ("+getHCIErrorCodeString(reason2)+")]]"; } public: |