[glib/wip/gcleanup: 70/78] gdbus-example-export: Fix behavior when using cleanup
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup: 70/78] gdbus-example-export: Fix behavior when using cleanup
- Date: Tue, 12 Nov 2013 05:33:00 +0000 (UTC)
commit 50f98b469928e0498b65528e5bfce2abc44eef8b
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:22:30 2013 +0100
gdbus-example-export: Fix behavior when using cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=711799
gio/tests/gdbus-example-export.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gio/tests/gdbus-example-export.c b/gio/tests/gdbus-example-export.c
index 5bb74d0..a029df4 100644
--- a/gio/tests/gdbus-example-export.c
+++ b/gio/tests/gdbus-example-export.c
@@ -290,19 +290,20 @@ on_name_acquired (GDBusConnection *connection,
{
}
+static GMainLoop *loop;
+
static void
on_name_lost (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
- exit (1);
+ g_main_loop_quit (user_data);
}
int
main (int argc, char *argv[])
{
guint owner_id;
- GMainLoop *loop;
MyObject *myobj;
/* We are lazy here - we don't want to manually provide
@@ -331,6 +332,7 @@ main (int argc, char *argv[])
g_dbus_node_info_unref (introspection_data);
g_object_unref (myobj);
+ g_main_loop_unref (loop);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]