aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-02-01 17:02:04 +0100
committerSven Gothel <[email protected]>2021-02-01 17:02:04 +0100
commit22ef77ba8f258aa14a5016f434b8961d6b43aca3 (patch)
tree31943087b53bf684aa8c43b918bc7f79c1905207
parent520a46aa73600667cc97701cba4b0084e72ab272 (diff)
DBTDevice::toString(): Add auto string; Fix string concatenation: Remove '.c_str()' which is a copy & paste bug, we concat std::string herev2.2.2
-rw-r--r--src/direct_bt/BTDevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/direct_bt/BTDevice.cpp b/src/direct_bt/BTDevice.cpp
index 8b29289d..303da656 100644
--- a/src/direct_bt/BTDevice.cpp
+++ b/src/direct_bt/BTDevice.cpp
@@ -142,8 +142,8 @@ std::string BTDevice::toString(bool includeDiscoveredServices) const noexcept {
std::string out("Device["+addressAndType.toString()+", name['"+name+
"'], age[total "+std::to_string(t0-ts_creation)+", ldisc "+std::to_string(t0-ts_last_discovery)+", lup "+std::to_string(t0-ts_last_update)+
"]ms, connected["+std::to_string(allowDisconnect)+"/"+std::to_string(isConnected)+", handle "+jau::uint16HexString(hciConnHandle)+
- ", sec[lvl "+getBTSecurityLevelString(pairing_data.sec_level_conn).c_str()+", io "+getSMPIOCapabilityString(pairing_data.ioCap_conn).c_str()+
- ", pairing "+getPairingModeString(pairing_data.mode).c_str()+", state "+getSMPPairingStateString(pairing_data.state).c_str()+"]], rssi "+std::to_string(getRSSI())+
+ ", sec[lvl "+getBTSecurityLevelString(pairing_data.sec_level_conn)+", io "+getSMPIOCapabilityString(pairing_data.ioCap_conn)+
+ ", auto "+getSMPIOCapabilityString(pairing_data.ioCap_auto)+", pairing "+getPairingModeString(pairing_data.mode)+", state "+getSMPPairingStateString(pairing_data.state)+"]], rssi "+std::to_string(getRSSI())+
", tx-power "+std::to_string(tx_power)+
", appearance "+jau::uint16HexString(static_cast<uint16_t>(appearance))+" ("+getAppearanceCatString(appearance)+
"), "+msdstr+", "+javaObjectToString()+"]");