From e80b814d7d95d222266699cef2779523a2eac7d9 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 13 Sep 2019 15:00:29 +0200 Subject: [PATCH] hci_transport_h4: avoid calling hci_transport_h4_trigger_next_read when transport is closed --- src/hci_transport_h4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hci_transport_h4.c b/src/hci_transport_h4.c index 0cb2f3bbd..4043f3525 100644 --- a/src/hci_transport_h4.c +++ b/src/hci_transport_h4.c @@ -291,7 +291,7 @@ static void hci_transport_h4_block_read(void){ case H4_OFF: bytes_to_read = 0; - return; + break; } #ifdef ENABLE_BAUDRATE_CHANGE_FLOWCONTROL_BUG_WORKAROUND @@ -303,7 +303,9 @@ static void hci_transport_h4_block_read(void){ } #endif - hci_transport_h4_trigger_next_read(); + if (h4_state != H4_OFF) { + hci_transport_h4_trigger_next_read(); + } } static void hci_transport_h4_block_sent(void){