summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-09 17:40:43 (GMT)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-10 14:01:50 (GMT)
commit505360b4be41a1bce0d06a3cbb4ca2eedc24c188 (patch)
treef53216026794b71f9180623efea0ba322980e921
parent17347cfb1514a4657e116c7ae88c3ce9317d8a16 (diff)
downloadtelepathy-account-widgets-505360b4be41a1bce0d06a3cbb4ca2eedc24c188.tar.gz
telepathy-account-widgets-505360b4be41a1bce0d06a3cbb4ca2eedc24c188.tar.xz
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.c11
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 c154048..60d8b5f 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));
}