nrf/drivers/bluetooth: Reset evt_len to size of static buffer each iter.

For each iteration of polling BLE events from the Bluetooth LE stack.
This commit is contained in:
Glenn Ruben Bakke 2018-01-08 23:39:22 +01:00 committed by Damien George
parent c8fd71612b
commit 95bd20522a
1 changed files with 1 additions and 1 deletions

View File

@ -1071,8 +1071,8 @@ void SWI2_EGU2_IRQHandler(void) {
sd_evt_handler(evt_id);
}
uint16_t evt_len = sizeof(m_ble_evt_buf);
while (1) {
uint16_t evt_len = sizeof(m_ble_evt_buf);
uint32_t err_code = sd_ble_evt_get(m_ble_evt_buf, &evt_len);
if (err_code != NRF_SUCCESS) {
// Possible error conditions: