[Telepathy-commits] [telepathy-glib/master] test-example-no-protocols: don't try RequestConnection until the CM is running
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Feb 12 09:52:09 PST 2009
This test explicitly forks and runs the connection manager, which
is a weird way of doing things. Because this example CM isn't
activatable, the call will fail with NameHasNoOwner until it's
running.
A more normal CM wouldn't need this - we'd just be able to call
RequestConnection directly.
---
tests/dbus/test-example-no-protocols.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/dbus/test-example-no-protocols.c b/tests/dbus/test-example-no-protocols.c
index e88f877..201fe64 100644
--- a/tests/dbus/test-example-no-protocols.c
+++ b/tests/dbus/test-example-no-protocols.c
@@ -38,6 +38,9 @@ connection_manager_got_info (TpConnectionManager *cm,
g_message ("Emitted got-info (source=%d)", source);
+ if (source < TP_CM_INFO_SOURCE_LIVE)
+ return;
+
tp_cli_connection_manager_run_request_connection (cm, -1,
"jabber", empty, &bus_name, &object_path, &error, NULL);
@@ -47,8 +50,7 @@ connection_manager_got_info (TpConnectionManager *cm,
g_error_free (error);
- if (source > 0)
- g_main_loop_quit (mainloop);
+ g_main_loop_quit (mainloop);
g_hash_table_destroy (empty);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list