diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-09-22 18:31:12 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-10-21 12:37:45 +0100 |
commit | ce8f21c62064a3ccd3bfd2d01444e017312ab1d3 (patch) | |
tree | bc1b8e0f915c920ee671c7d730f8dab19291114c | |
parent | 021d157ba43702b05973cbd96fafcf6ec3b96ece (diff) | |
download | dbus-glib-ce8f21c62064a3ccd3bfd2d01444e017312ab1d3.tar.gz |
test-variant-recursion: use a private bus so we can free it more thoroughly
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | test/core/test-variant-recursion.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/core/test-variant-recursion.c b/test/core/test-variant-recursion.c index e479f65..8a2d36f 100644 --- a/test/core/test-variant-recursion.c +++ b/test/core/test-variant-recursion.c @@ -1,12 +1,16 @@ #include <config.h> /* -*- mode: C; c-file-style: "gnu" -*- */ -#include <dbus/dbus-glib.h> #include <stdio.h> #include <stdlib.h> #include <string.h> + #include <glib.h> #include <glib-object.h> +#include <dbus/dbus.h> +#include <dbus/dbus-glib.h> + +#include "test/lib/util.h" static gboolean make_recursive_stringify_call (int recursion_depth, @@ -59,7 +63,7 @@ main (int argc, char **argv) loop = g_main_loop_new (NULL, FALSE); - connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); + connection = dbus_g_bus_get_private (DBUS_BUS_SESSION, NULL, &error); if (connection == NULL) g_error ("Failed to open connection to bus: %s", error->message); @@ -94,7 +98,11 @@ main (int argc, char **argv) g_object_unref (G_OBJECT (proxy)); + test_run_until_disconnected (connection, NULL); + dbus_g_connection_unref (connection); + g_main_loop_unref (loop); + dbus_shutdown (); return 0; } |