diff mbox series

[BlueZ,v2,14/15] shared/tester: Fix not detecting NULL packets

Message ID 20250407200124.881534-15-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v2,01/15] test-bap: Introduce DISC tests for LC3 | expand

Commit Message

Luiz Augusto von Dentz April 7, 2025, 8:01 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When receiving packets if the iovec is NULL it means it shall be
skipped.
---
 src/shared/tester.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/src/shared/tester.c b/src/shared/tester.c
index 56c8cba6f578..371ccacedc66 100644
--- a/src/shared/tester.c
+++ b/src/shared/tester.c
@@ -978,6 +978,9 @@  static bool test_io_recv(struct io *io, void *user_data)
 	if (!iov)
 		return true;
 
+	if (test->iovcnt && !iov->iov_base)
+		iov = test_get_iov(test);
+
 	g_assert_cmpint(len, ==, iov->iov_len);
 
 	if (memcmp(buf, iov->iov_base, len))