diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-12 16:41:23 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-12 16:41:23 +0100 |
commit | 377c294f09e280a0daf44b2577fd317cb27983f7 (patch) | |
tree | 94f78b4e301d6ab0190e9a96bad44bd5e1046234 | |
parent | c029b52f66c3c90d4611a352f09a88bac4a9ea9f (diff) | |
parent | 31cb359ef8c1dc80f700c3fcc72d2578b0ffa0ba (diff) |
Merge tag 'telepathy-glib-0.21.0' into next
telepathy-glib 0.21.0
Conflicts:
configure.ac
telepathy-glib/connection.c
telepathy-glib/util.c
telepathy-glib/util.h
tests/dbus/contacts.c
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | telepathy-glib/account.c | 2 | ||||
-rw-r--r-- | telepathy-glib/connection.c | 1 | ||||
-rw-r--r-- | tests/dbus/contacts.c | 19 |
4 files changed, 23 insertions, 7 deletions
@@ -1,4 +1,4 @@ -telepathy-glib 0.21.0 (UNRELEASED) +telepathy-glib 0.21.0 (2013-04-03) ================================== This starts a new development branch. @@ -30,6 +30,12 @@ Fixes: • Fix builds with Automake 1.13 (fd.o #59604, Nuno Araujo) +• Fix unit tests when running with glib >=2.36 (fd.o #63069, Xavier) + +• Fix refcycle preventing TpConnection objects to be freed. This theoretically + introduce a behaviour change of tp_connection_get_self_contact() that now + returns NULL when the connection as been invalidated. (fd.o #63027, Xavier) + Deprecations: • tp_g_key_file_get_int64, tp_g_key_file_get_uint64 (use the corresponding diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c index 0542065b7..4f2d8b145 100644 --- a/telepathy-glib/account.c +++ b/telepathy-glib/account.c @@ -2053,7 +2053,7 @@ tp_account_class_init (TpAccountClass *klass) * The notify::uri-schemes signal cannot be relied on if the Account Manager * is Mission Control version 5.14.0 or older. * - * Since: UNRELEASED + * Since: 0.21.0 */ g_object_class_install_property (object_class, PROP_URI_SCHEMES, g_param_spec_boxed ("uri-schemes", diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c index dc70c61fe..a51f13800 100644 --- a/telepathy-glib/connection.c +++ b/telepathy-glib/connection.c @@ -1315,6 +1315,7 @@ tp_connection_dispose (GObject *object) } tp_clear_pointer (&self->priv->blocked_contacts, g_ptr_array_unref); + g_clear_object (&self->priv->self_contact); ((GObjectClass *) tp_connection_parent_class)->dispose (object); } diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c index 41eddb9ab..6d9fe143e 100644 --- a/tests/dbus/contacts.c +++ b/tests/dbus/contacts.c @@ -978,7 +978,7 @@ test_upgrade_noop (Fixture *f, upgrade_cb, &result); g_main_loop_run (result.loop); g_assert_no_error (result.error); - reset_result (&f->result); + reset_result (&result); put_the_connection_back (f); @@ -1455,6 +1455,8 @@ test_dup_if_possible (Fixture *f, g_assert (contact != alice); g_assert_cmpstr (tp_contact_get_identifier (contact), ==, "bob"); g_assert_cmpuint (tp_contact_get_handle (contact), ==, bob_handle); + g_object_unref (contact); + g_object_unref (alice); } typedef struct @@ -1856,6 +1858,7 @@ test_contact_list (Fixture *f, gconstpointer unused G_GNUC_UNUSED) { const GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONTACT_LIST, 0 }; + const GQuark feature_connected[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 }; Result result = { g_main_loop_new (NULL, FALSE), NULL }; TpTestsContactListManager *manager; TpClientFactory *factory; @@ -1896,8 +1899,7 @@ test_contact_list (Fixture *f, g_signal_connect_swapped (f->client_conn, "notify::contact-list-state", G_CALLBACK (finish), &result); tp_cli_connection_call_connect (f->client_conn, -1, NULL, NULL, NULL, NULL); - g_main_loop_run (result.loop); - g_assert_no_error (result.error); + tp_tests_proxy_run_until_prepared (f->client_conn, feature_connected); g_assert_cmpint (tp_connection_get_contact_list_state (f->client_conn), ==, TP_CONTACT_LIST_STATE_SUCCESS); @@ -2062,12 +2064,19 @@ teardown (Fixture *f, gconstpointer unused G_GNUC_UNUSED) { if (f->client_conn != NULL) - tp_tests_connection_assert_disconnect_succeeds (f->client_conn); + { + TpConnection *conn = f->client_conn; + + g_object_add_weak_pointer ((GObject *) conn, (gpointer *) &conn); + tp_tests_connection_assert_disconnect_succeeds (conn); + g_object_unref (conn); + g_assert (conn == NULL); + f->client_conn = NULL; + } if (f->all_contact_features != NULL) g_array_unref (f->all_contact_features); - tp_clear_object (&f->client_conn); f->service_repo = NULL; tp_clear_object (&f->service_conn); tp_clear_object (&f->base_connection); |