diff options
author | Sven Gothel <[email protected]> | 2023-01-01 08:58:45 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-01 08:58:45 +0100 |
commit | b49c5f0c10e10c5740779b6b30bb011898a74c1f (patch) | |
tree | c358f24ca70c099d1637f7e9e824fc655fefb3c7 /src/direct_bt/HCIHandler.cpp | |
parent | c0189ff17a9baaef7b7b874256ba3bc70e1b641b (diff) |
Adopt to jaulib ringbuffer changes v1.0.1-8-g854a714
Diffstat (limited to 'src/direct_bt/HCIHandler.cpp')
-rw-r--r-- | src/direct_bt/HCIHandler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp index 46e3da38..f79e86d9 100644 --- a/src/direct_bt/HCIHandler.cpp +++ b/src/direct_bt/HCIHandler.cpp @@ -523,7 +523,11 @@ void HCIHandler::hciReaderWork(jau::service_runner& sr) noexcept { WARN_PRINT("dev_id %u: IO RECV Drop (%u oldest elements of %u capacity, ring full) - %s", dev_id, dropCount, hciEventRing.capacity(), toString().c_str()); } - hciEventRing.putBlocking( std::move( event ), jau::fractions_i64::zero ); + if( !hciEventRing.putBlocking( std::move( event ), jau::fractions_i64::zero ) ) { + ERR_PRINT2("hciEventRing put: %s", hciEventRing.toString().c_str()); + sr.set_shall_stop(); + return; + } } else if( event->isMetaEvent(HCIMetaEventType::LE_ADVERTISING_REPORT) ) { // issue callbacks for the translated AD events jau::darray<std::unique_ptr<EInfoReport>> eirlist = EInfoReport::read_ad_reports(event->getParam(), event->getParamSize()); |