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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

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 --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))
-- 
2.49.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux