[glib/wip/gcleanup] gdbus-testserver: Fix behavior during cleanup
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup] gdbus-testserver: Fix behavior during cleanup
- Date: Sat, 9 Nov 2013 19:57:26 +0000 (UTC)
commit e8f57e3c424e5e3d4a96ec4b29000560111f2bac
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:24:27 2013 +0100
gdbus-testserver: Fix behavior during cleanup
gio/tests/gdbus-testserver.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gio/tests/gdbus-testserver.c b/gio/tests/gdbus-testserver.c
index 7f99a19..f116b27 100644
--- a/gio/tests/gdbus-testserver.c
+++ b/gio/tests/gdbus-testserver.c
@@ -834,7 +834,7 @@ on_name_lost (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
- exit (1);
+ g_main_loop_quit (user_data);
}
int
@@ -869,16 +869,17 @@ main (int argc, char *argv[])
g_hash_table_insert (properties, g_strdup ("foo"), g_variant_ref_sink (g_variant_new_string ("a frobbed
string")));
g_hash_table_insert (properties, g_strdup ("PropertyThatWillBeInvalidated"), g_variant_ref_sink
(g_variant_new_string ("InitialValue")));
+ loop = g_main_loop_new (NULL, FALSE);
+
owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
"com.example.TestService",
G_BUS_NAME_OWNER_FLAGS_NONE,
on_bus_acquired,
on_name_acquired,
on_name_lost,
- NULL,
+ loop,
NULL);
- loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (loop);
g_bus_unown_name (owner_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]