From 12eda22dfedf27fbefe84e3c1b30f245ffad5544 Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Fri, 20 May 2022 15:38:12 +0200 Subject: [PATCH] samples: Bluetooth: Fix bad info->flags check in unicast_server The check did not properly check the info->flags as a bitfield, and thus never decoded the data. Signed-off-by: Emil Gydesen --- samples/bluetooth/unicast_audio_server/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bluetooth/unicast_audio_server/src/main.c b/samples/bluetooth/unicast_audio_server/src/main.c index 7b918977051..4effa6ca0ba 100644 --- a/samples/bluetooth/unicast_audio_server/src/main.c +++ b/samples/bluetooth/unicast_audio_server/src/main.c @@ -287,7 +287,7 @@ static void stream_recv_lc3_codec(struct bt_audio_stream *stream, return; } - if (info->flags != BT_ISO_FLAGS_VALID) { + if ((info->flags & BT_ISO_FLAGS_VALID) == 0) { printk("Bad packet: 0x%02X\n", info->flags); in_buf = NULL;