From efc1df55758f287e8647ae160314c93def22eb07 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sat, 6 May 2023 00:02:56 +0200 Subject: [PATCH] btstack_uart_posix: abort requested read/write operation on set read/write complete handler --- platform/posix/btstack_uart_posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/posix/btstack_uart_posix.c b/platform/posix/btstack_uart_posix.c index 68fe8a4cf..55f20aac2 100644 --- a/platform/posix/btstack_uart_posix.c +++ b/platform/posix/btstack_uart_posix.c @@ -372,10 +372,12 @@ static int btstack_uart_posix_close_new(void){ } static void btstack_uart_posix_set_block_received( void (*block_handler)(void)){ + btstack_uart_block_read_bytes_len = 0; block_received = block_handler; } static void btstack_uart_posix_set_block_sent( void (*block_handler)(void)){ + btstack_uart_block_write_bytes_len = 0; block_sent = block_handler; }