[next] telepathy-mission-control: mc-debug-server: hold a reference to the debug sender

Simon McVittie smcv at kemper.freedesktop.org
Thu Apr 3 07:28:04 PDT 2014


Module: telepathy-mission-control
Branch: next
Commit: 55ded353d5e5e26b66d21898dcecd12311dea04b
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=55ded353d5e5e26b66d21898dcecd12311dea04b

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri Mar 21 18:35:23 2014 +0000

mc-debug-server: hold a reference to the debug sender

It seems we were instantiating it once per debug message. Oops.
(The real Mission Control got this right, though.)

---

 tests/twisted/mc-debug-server.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/twisted/mc-debug-server.c b/tests/twisted/mc-debug-server.c
index 5364dc9..8497c02 100644
--- a/tests/twisted/mc-debug-server.c
+++ b/tests/twisted/mc-debug-server.c
@@ -185,11 +185,14 @@ main (int argc, char **argv)
     GMainLoop *teardown_loop;
     guint linger_time = 5;
     guint test_interface_id = 0;
+    TpDebugSender *debug_sender = NULL;
 
     g_type_init ();
 
     g_set_application_name ("Mission Control regression tests");
 
+    debug_sender = tp_debug_sender_dup ();
+
     mcd_debug_init ();
     tp_debug_set_flags (g_getenv ("MC_TP_DEBUG"));
 
@@ -259,6 +262,7 @@ main (int argc, char **argv)
     tp_clear_object (&bus_daemon);
 
     g_message ("Exiting with %d", ret);
+    tp_clear_object (&debug_sender);
 
     return ret;
 }



More information about the telepathy-commits mailing list