aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-02-06 17:58:39 +0100
committerSven Gothel <[email protected]>2021-02-06 17:58:39 +0100
commitda21281f875a0df46bda4487ecba6ba768865545 (patch)
tree60204517e6532c616466ac86240927c33cb7d428 /src
parentec2e9c45f3c250a63db5256a1454558d22c70138 (diff)
HCIHandler.cpp: Fix NPE: Don'e use nullptr conn (copy & paste bug, oops)
Diffstat (limited to 'src')
-rw-r--r--src/direct_bt/HCIHandler.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp
index 47dd325b..745ef56a 100644
--- a/src/direct_bt/HCIHandler.cpp
+++ b/src/direct_bt/HCIHandler.cpp
@@ -224,8 +224,8 @@ std::unique_ptr<MgmtEvent> HCIHandler::translate(HCIEvent& ev) noexcept {
const LEFeatures features = static_cast<LEFeatures>(jau::get_uint64(ev_cc->features, 0, true /* littleEndian */));
const HCIConnectionRef conn = findTrackerConnection(handle);
if( nullptr == conn ) {
- WARN_PRINT("HCIHandler::translate(reader): LE_REMOTE_FEAT_COMPLETE: Not tracked conn_handle %s: %s",
- jau::uint16HexString(handle).c_str(), conn->toString().c_str());
+ WARN_PRINT("HCIHandler::translate(reader): LE_REMOTE_FEAT_COMPLETE: Not tracked conn_handle %s",
+ jau::uint16HexString(handle).c_str());
return nullptr;
}
if( HCIStatusCode::SUCCESS != status ) {
@@ -294,8 +294,8 @@ std::unique_ptr<MgmtEvent> HCIHandler::translate(HCIEvent& ev) noexcept {
const uint16_t handle = jau::le_to_cpu(ev_cc->handle);
const HCIConnectionRef conn = findTrackerConnection(handle);
if( nullptr == conn ) {
- WARN_PRINT("HCIHandler::translate(reader): ENCRYPT_CHANGE: Not tracked conn_handle %s: %s",
- jau::uint16HexString(handle).c_str(), conn->toString().c_str());
+ WARN_PRINT("HCIHandler::translate(reader): ENCRYPT_CHANGE: Not tracked conn_handle %s",
+ jau::uint16HexString(handle).c_str());
return nullptr;
}
return std::make_unique<MgmtEvtHCIEncryptionChanged>(dev_id, conn->getAddressAndType(), status, ev_cc->encrypt);
@@ -311,8 +311,8 @@ std::unique_ptr<MgmtEvent> HCIHandler::translate(HCIEvent& ev) noexcept {
const uint16_t handle = jau::le_to_cpu(ev_cc->handle);
const HCIConnectionRef conn = findTrackerConnection(handle);
if( nullptr == conn ) {
- WARN_PRINT("HCIHandler::translate(reader): ENCRYPT_KEY_REFRESH_COMPLETE: Not tracked conn_handle %s: %s",
- jau::uint16HexString(handle).c_str(), conn->toString().c_str());
+ WARN_PRINT("HCIHandler::translate(reader): ENCRYPT_KEY_REFRESH_COMPLETE: Not tracked conn_handle %s",
+ jau::uint16HexString(handle).c_str());
return nullptr;
}
return std::make_unique<MgmtEvtHCIEncryptionKeyRefreshComplete>(dev_id, conn->getAddressAndType(), status);
@@ -380,8 +380,8 @@ void HCIHandler::hciReaderThreadImpl() noexcept {
cb.invoke(conn->getAddressAndType(), *smpPDU, l2cap);
});
} else {
- WARN_PRINT("HCIHandler-IO RECV Drop (ACL.SMP): Not tracked conn_handle %s: %s; %s, %s",
- jau::uint16HexString(l2cap.handle).c_str(), conn->toString().c_str(),
+ WARN_PRINT("HCIHandler-IO RECV Drop (ACL.SMP): Not tracked conn_handle %s: %s, %s",
+ jau::uint16HexString(l2cap.handle).c_str(),
l2cap.toString().c_str(), smpPDU->toString().c_str());
}
} else {