[Pkg-telepathy-commits] [telepathy-mission-control-6] 178/280: mc-debug-server: don't exit when disconnected from system bus
Simon McVittie
smcv at debian.org
Thu Mar 27 20:07:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.
commit b69fcaca8a6c6d60c1106178d1285ef29466c189
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed Nov 13 17:07:46 2013 +0000
mc-debug-server: don't exit when disconnected from system bus
The session bus is our fake system bus, too. We exit when libdbus tells
us we have disconnected, and ignore both the possible ways in which
GDBus can kill us, in order to get coverage stats.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27727
---
tests/twisted/mc-debug-server.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tests/twisted/mc-debug-server.c b/tests/twisted/mc-debug-server.c
index 48f0248..917a5d3 100644
--- a/tests/twisted/mc-debug-server.c
+++ b/tests/twisted/mc-debug-server.c
@@ -154,6 +154,7 @@ main (int argc, char **argv)
{
GError *error = NULL;
GDBusConnection *gdbus = NULL;
+ GDBusConnection *gdbus_system = NULL;
DBusConnection *connection = NULL;
int ret = 1;
GMainLoop *teardown_loop;
@@ -185,6 +186,18 @@ main (int argc, char **argv)
g_dbus_connection_set_exit_on_close (gdbus, FALSE);
+ gdbus_system = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
+
+ if (gdbus_system == NULL)
+ {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ error = NULL;
+ goto out;
+ }
+
+ g_dbus_connection_set_exit_on_close (gdbus_system, FALSE);
+
bus_daemon = tp_dbus_daemon_dup (&error);
if (bus_daemon == NULL)
@@ -238,6 +251,7 @@ out:
}
tp_clear_object (&gdbus);
+ tp_clear_object (&gdbus_system);
tp_clear_object (&bus_daemon);
dbus_shutdown ();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git
More information about the Pkg-telepathy-commits
mailing list