diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-09 13:40:43 -0400 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-10 10:01:50 -0400 |
commit | 505360b4be41a1bce0d06a3cbb4ca2eedc24c188 (patch) | |
tree | f53216026794b71f9180623efea0ba322980e921 | |
parent | 17347cfb1514a4657e116c7ae88c3ce9317d8a16 (diff) | |
download | telepathy-account-widgets-505360b4be41a1bce0d06a3cbb4ca2eedc24c188.tar.gz |
prevent infinite loop if ContactInfo is not implemented
https://bugzilla.gnome.org/show_bug.cgi?id=709677
-rw-r--r-- | tp-account-widgets/tpaw-user-info.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tp-account-widgets/tpaw-user-info.c b/tp-account-widgets/tpaw-user-info.c index c1540485..60d8b5f1 100644 --- a/tp-account-widgets/tpaw-user-info.c +++ b/tp-account-widgets/tpaw-user-info.c @@ -46,6 +46,8 @@ struct _TpawUserInfoPrivate GList *details_to_set; gboolean details_changed; GCancellable *details_cancellable; + + gboolean tried_preparing_contact_info; }; enum @@ -401,10 +403,17 @@ reload_contact_info (TpawUserInfo *self) { contact = tp_connection_get_self_contact (connection); + /* FIXME: we should rely on the factory to do this, see bgo#706892 */ if (!tp_proxy_is_prepared (connection, - TP_CONNECTION_FEATURE_CONTACT_INFO)) + TP_CONNECTION_FEATURE_CONTACT_INFO) && + !self->priv->tried_preparing_contact_info) { GQuark features[] = { TP_CONNECTION_FEATURE_CONTACT_INFO, 0 }; + + /* Prevent an infinite loop if the connection doesn't implement + * ContactInfo, see bgo#709677 */ + self->priv->tried_preparing_contact_info = TRUE; + tp_proxy_prepare_async (connection, features, connection_contact_info_prepared_cb, g_object_ref (self)); } |