diff options
author | Sven Gothel <[email protected]> | 2020-10-20 08:16:13 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-20 08:16:13 +0200 |
commit | aa43800a7722940ac1a902b088a6900e29efd0c9 (patch) | |
tree | 47f0bc5162b61a41786171dc900cd74070315d86 /src | |
parent | 1ab5287b269a71589d9693de1df84239c1490c59 (diff) |
adopt ringbuffer Size_type changes, using jau::nsize_t
Revising commit 2e40a6fbb84ef21bb9551c653199964e55d7954b
Diffstat (limited to 'src')
-rw-r--r-- | src/direct_bt/DBTManager.cpp | 6 | ||||
-rw-r--r-- | src/direct_bt/GATTHandler.cpp | 2 | ||||
-rw-r--r-- | src/direct_bt/HCIHandler.cpp | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/direct_bt/DBTManager.cpp b/src/direct_bt/DBTManager.cpp index a0654f69..dcff5ea9 100644 --- a/src/direct_bt/DBTManager.cpp +++ b/src/direct_bt/DBTManager.cpp @@ -110,9 +110,9 @@ void DBTManager::mgmtReaderThreadImpl() noexcept { if( MgmtEvent::Opcode::CMD_COMPLETE == opc || MgmtEvent::Opcode::CMD_STATUS == opc ) { COND_PRINT(env.DEBUG_EVENT, "DBTManager-IO RECV (CMD) %s", event->toString().c_str()); if( mgmtEventRing.isFull() ) { - const int dropCount = mgmtEventRing.capacity()/4; + const jau::nsize_t dropCount = mgmtEventRing.capacity()/4; mgmtEventRing.drop(dropCount); - WARN_PRINT("DBTManager-IO RECV Drop (%d oldest elements of %d capacity, ring full)", dropCount, mgmtEventRing.capacity()); + WARN_PRINT("DBTManager-IO RECV Drop (%u oldest elements of %u capacity, ring full)", dropCount, mgmtEventRing.capacity()); } mgmtEventRing.putBlocking( event ); } else { @@ -126,7 +126,7 @@ void DBTManager::mgmtReaderThreadImpl() noexcept { } { const std::lock_guard<std::mutex> lock(mtx_mgmtReaderLifecycle); // RAII-style acquire and relinquish via destructor - WORDY_PRINT("DBTManager::reader: Ended. Ring has %zu entries flushed", mgmtEventRing.getSize()); + WORDY_PRINT("DBTManager::reader: Ended. Ring has %u entries flushed", mgmtEventRing.getSize()); mgmtEventRing.clear(); mgmtReaderRunning = false; cv_mgmtReaderInit.notify_all(); diff --git a/src/direct_bt/GATTHandler.cpp b/src/direct_bt/GATTHandler.cpp index bbc303ea..9ab4c31e 100644 --- a/src/direct_bt/GATTHandler.cpp +++ b/src/direct_bt/GATTHandler.cpp @@ -269,7 +269,7 @@ void GATTHandler::l2capReaderThreadImpl() { } { const std::lock_guard<std::mutex> lock(mtx_l2capReaderLifecycle); // RAII-style acquire and relinquish via destructor - WORDY_PRINT("GATTHandler::reader: Ended. Ring has %zu entries flushed", attPDURing.getSize()); + WORDY_PRINT("GATTHandler::reader: Ended. Ring has %u entries flushed", attPDURing.getSize()); attPDURing.clear(); l2capReaderRunning = false; cv_l2capReaderInit.notify_all(); diff --git a/src/direct_bt/HCIHandler.cpp b/src/direct_bt/HCIHandler.cpp index 2fe1bb05..017c9155 100644 --- a/src/direct_bt/HCIHandler.cpp +++ b/src/direct_bt/HCIHandler.cpp @@ -295,9 +295,9 @@ void HCIHandler::hciReaderThreadImpl() noexcept { { COND_PRINT(env.DEBUG_EVENT, "HCIHandler-IO RECV (CMD) %s", event->toString().c_str()); if( hciEventRing.isFull() ) { - const int dropCount = hciEventRing.capacity()/4; + const jau::nsize_t dropCount = hciEventRing.capacity()/4; hciEventRing.drop(dropCount); - WARN_PRINT("HCIHandler-IO RECV Drop (%d oldest elements of %d capacity, ring full)", dropCount, hciEventRing.capacity()); + WARN_PRINT("HCIHandler-IO RECV Drop (%u oldest elements of %u capacity, ring full)", dropCount, hciEventRing.capacity()); } hciEventRing.putBlocking( event ); } else if( event->isMetaEvent(HCIMetaEventType::LE_ADVERTISING_REPORT) ) { @@ -323,7 +323,7 @@ void HCIHandler::hciReaderThreadImpl() noexcept { } { const std::lock_guard<std::mutex> lock(mtx_hciReaderLifecycle); // RAII-style acquire and relinquish via destructor - WORDY_PRINT("HCIHandler::reader: Ended. Ring has %zu entries flushed", hciEventRing.getSize()); + WORDY_PRINT("HCIHandler::reader: Ended. Ring has %u entries flushed", hciEventRing.getSize()); hciEventRing.clear(); hciReaderRunning = false; cv_hciReaderInit.notify_all(); |