[PATCH 1/3] unit/avrcp: Refactor tests to use destroy_context()

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

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

---
 unit/test-avrcp.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 381e7cb..e9fe7e3 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -246,15 +246,7 @@ static void execute_context(struct context *context)
 {
 	g_main_loop_run(context->main_loop);
 
-	if (context->source > 0)
-		g_source_remove(context->source);
-
-	avrcp_shutdown(context->session);
-
-	g_main_loop_unref(context->main_loop);
-
-	test_free(context->data);
-	g_free(context);
+	destroy_context(context);
 }
 
 static void test_server(gconstpointer data)
-- 
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