Fix 'dbus connection referencing issue in test-relay'.
authorRalf Habacker <ralf.habacker@freenet.de>
Mon, 13 Apr 2015 13:04:20 +0000 (15:04 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Mon, 13 Apr 2015 13:31:28 +0000 (15:31 +0200)
The watches added on connection setup should be removed on shutdown.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90005
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test/relay.c

index ecfe4c8..984fde1 100644 (file)
@@ -273,6 +273,7 @@ teardown (Fixture *f,
 {
   if (f->left_client_conn != NULL)
     {
+      test_connection_shutdown(NULL, f->left_client_conn);
       dbus_connection_close (f->left_client_conn);
       dbus_connection_unref (f->left_client_conn);
       f->left_client_conn = NULL;
@@ -280,6 +281,7 @@ teardown (Fixture *f,
 
   if (f->right_client_conn != NULL)
     {
+      test_connection_shutdown(NULL, f->right_client_conn);
       dbus_connection_close (f->right_client_conn);
       dbus_connection_unref (f->right_client_conn);
       f->right_client_conn = NULL;
@@ -287,6 +289,7 @@ teardown (Fixture *f,
 
   if (f->left_server_conn != NULL)
     {
+      test_connection_shutdown(NULL, f->left_server_conn);
       dbus_connection_close (f->left_server_conn);
       dbus_connection_unref (f->left_server_conn);
       f->left_server_conn = NULL;
@@ -294,6 +297,7 @@ teardown (Fixture *f,
 
   if (f->right_server_conn != NULL)
     {
+      test_connection_shutdown(NULL, f->right_server_conn);
       dbus_connection_close (f->right_server_conn);
       dbus_connection_unref (f->right_server_conn);
       f->right_server_conn = NULL;