[PATCH 2/2] unit/avctp: Cleanup code, remove fragmentation support

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

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

---
 unit/test-avctp.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/unit/test-avctp.c b/unit/test-avctp.c
index 9d94ae0..be1dfd7 100644
--- a/unit/test-avctp.c
+++ b/unit/test-avctp.c
@@ -42,7 +42,6 @@
 
 struct test_pdu {
 	bool valid;
-	bool fragmented;
 	const uint8_t *data;
 	size_t size;
 };
@@ -71,14 +70,6 @@ struct context {
 		.size = sizeof(data(args)),			\
 	}
 
-#define frg_pdu(args...)					\
-	{							\
-		.valid = true,					\
-		.fragmented = true,				\
-		.data = data(args),				\
-		.size = sizeof(data(args)),			\
-	}
-
 #define define_test(name, function, args...)				\
 	do {								\
 		const struct test_pdu pdus[] = {			\
@@ -133,9 +124,6 @@ static gboolean send_pdu(gpointer user_data)
 
 	g_assert_cmpint(len, ==, pdu->size);
 
-	if (pdu->fragmented)
-		return send_pdu(user_data);
-
 	context->process = 0;
 	return FALSE;
 }
@@ -180,8 +168,7 @@ static gboolean test_handler(GIOChannel *channel, GIOCondition cond,
 
 	g_assert(memcmp(buf, pdu->data, pdu->size) == 0);
 
-	if (!pdu->fragmented)
-		context_process(context);
+	context_process(context);
 
 	return TRUE;
 }
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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