telepathy-glib: tests/lib: Stop using tp_connection_new()
Xavier Claessens
xclaesse at kemper.freedesktop.org
Tue Jul 3 04:55:40 PDT 2012
Module: telepathy-glib
Branch: master
Commit: be781d63238f4eb55a334508c6073101d01a4ab0
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=be781d63238f4eb55a334508c6073101d01a4ab0
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Wed May 16 14:37:29 2012 +0200
tests/lib: Stop using tp_connection_new()
https://bugs.freedesktop.org/show_bug.cgi?id=49372
---
tests/lib/util.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/lib/util.c b/tests/lib/util.c
index 009d964..21d3855 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -183,6 +183,7 @@ tp_tests_create_conn (GType conn_type,
TpConnection **client_conn)
{
TpDBusDaemon *dbus;
+ TpSimpleClientFactory *factory;
gchar *name;
gchar *conn_path;
GError *error = NULL;
@@ -191,6 +192,7 @@ tp_tests_create_conn (GType conn_type,
g_assert (client_conn != NULL);
dbus = tp_tests_dbus_daemon_dup_or_die ();
+ factory = (TpSimpleClientFactory *) tp_automatic_client_factory_new (dbus);
*service_conn = tp_tests_object_new_static_class (
conn_type,
@@ -203,8 +205,8 @@ tp_tests_create_conn (GType conn_type,
&name, &conn_path, &error));
g_assert_no_error (error);
- *client_conn = tp_connection_new (dbus, name, conn_path,
- &error);
+ *client_conn = tp_simple_client_factory_ensure_connection (factory,
+ conn_path, NULL, &error);
g_assert (*client_conn != NULL);
g_assert_no_error (error);
@@ -220,6 +222,7 @@ tp_tests_create_conn (GType conn_type,
g_free (conn_path);
g_object_unref (dbus);
+ g_object_unref (factory);
}
void
More information about the telepathy-commits
mailing list