From ad254f5df72afc98c915b8e568d3f5533da8d0f3 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 12 Sep 2019 11:04:31 +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 e8ae8b9e1..0cb2f3bbd 100644 --- a/src/hci_transport_h4.c +++ b/src/hci_transport_h4.c @@ -288,8 +288,10 @@ static void hci_transport_h4_block_read(void){ packet_handler(hci_packet[0], &hci_packet[1], read_pos-1); hci_transport_h4_reset_statemachine(); break; - default: - break; + + case H4_OFF: + bytes_to_read = 0; + return; } #ifdef ENABLE_BAUDRATE_CHANGE_FLOWCONTROL_BUG_WORKAROUND