[telepathy-mission-control/master] mc-debug-server: only linger for 5 seconds by default (adjust via $MC_LINGER_TIME)
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu May 28 03:15:19 PDT 2009
5 seconds should be plenty, in practice - all our D-Bus calls will fail
because we've been disconnected.
---
test/twisted/mc-debug-server.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/test/twisted/mc-debug-server.c b/test/twisted/mc-debug-server.c
index 7de2180..2e6ddf2 100644
--- a/test/twisted/mc-debug-server.c
+++ b/test/twisted/mc-debug-server.c
@@ -119,6 +119,7 @@ main (int argc, char **argv)
DBusConnection *connection;
int ret = 1;
GMainLoop *teardown_loop;
+ guint linger_time = 5;
g_type_init ();
@@ -158,10 +159,14 @@ main (int argc, char **argv)
teardown_loop = g_main_loop_new (NULL, FALSE);
- /* 30 seconds is enough time for a D-Bus call to finish, which should mean
- * everything has settled down by then - we keep running in the background
- * until it's all over. This means valgrind gets complete information. */
- g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, 30, the_end,
+ if (g_getenv ("MC_LINGER_TIME") != NULL)
+ {
+ linger_time = g_ascii_strtoull (g_getenv ("MC_LINGER_TIME"), NULL, 10);
+ }
+
+ /* Keep running in the background until it's all over. This means valgrind
+ * and refdbg can get complete information. */
+ g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, linger_time, the_end,
teardown_loop, (GDestroyNotify) g_main_loop_unref);
g_main_loop_run (teardown_loop);
--
1.5.6.5
More information about the telepathy-commits
mailing list