summaryrefslogtreecommitdiff
path: root/test/corrupt.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-07-12 12:51:38 +0100
committerSimon McVittie <smcv@collabora.com>2018-08-02 17:16:43 +0100
commit8177bbcf5262724d9bc5538b81aa366a51fbd520 (patch)
treea3725a7039c4b8f8c23f93485233778a6429cf65 /test/corrupt.c
parent620406f7574f8078d4927ce6e2cc9e1491a4e893 (diff)
downloaddbus-8177bbcf5262724d9bc5538b81aa366a51fbd520.tar.gz
tests: Detach most connections from main loop before closing
We don't need to do this for connections that were never set up with the main loop. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194
Diffstat (limited to 'test/corrupt.c')
-rw-r--r--test/corrupt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/corrupt.c b/test/corrupt.c
index be5314b4..758084a4 100644
--- a/test/corrupt.c
+++ b/test/corrupt.c
@@ -275,6 +275,7 @@ test_corrupt (Fixture *f,
* fd, whereas DBusLoop + DBusSocketSetEpoll doesn't. On Unix
* we could use dup() but that isn't portable to Windows :-(
*/
+ test_connection_shutdown (f->ctx, f->server_conn);
dbus_connection_close (f->server_conn);
dbus_connection_unref (f->server_conn);
f->server_conn = NULL;
@@ -362,6 +363,7 @@ test_byte_order (Fixture *f,
dbus_message_unref (message);
/* Free the DBusConnection before the GSocket, as above. */
+ test_connection_shutdown (f->ctx, f->server_conn);
dbus_connection_close (f->server_conn);
dbus_connection_unref (f->server_conn);
f->server_conn = NULL;