[telepathy-gabble/telepathy-gabble-0.8] presence-cache.c: More DEBUG() during avatar conflict resolution
Alban Crequy
alban.crequy at collabora.co.uk
Thu Oct 8 06:03:31 PDT 2009
---
src/presence-cache.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/presence-cache.c b/src/presence-cache.c
index 29048c0..61067ca 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -674,6 +674,7 @@ self_vcard_request_cb (GabbleVCardManager *self,
g_free (sha1);
}
+ DEBUG ("End of avatar conflict resolution");
}
static void
@@ -700,7 +701,10 @@ self_avatar_resolve_conflict (GabblePresenceCache *cache)
* The real contacts should still get the last avatar.
*/
if (priv->avatar_reset_pending)
- return;
+ {
+ DEBUG ("There is already an avatar conflict resolution pending.");
+ return;
+ }
/* according to XEP-0153 section 4.3-2. 3rd bullet:
* if we receive a photo from another resource, then we MUST
@@ -709,6 +713,8 @@ self_avatar_resolve_conflict (GabblePresenceCache *cache)
* when that arrives, we may start setting the photo node in our
* presence again.
*/
+ DEBUG ("Reset our avatar, signal our presence without an avatar and request"
+ " our own vCard.");
priv->avatar_reset_pending = TRUE;
presence->avatar_sha1 = NULL;
if (!_gabble_connection_signal_own_presence (priv->conn, &error))
@@ -784,6 +790,8 @@ _grab_avatar_sha1 (GabblePresenceCache *cache,
{
if (handle == base_conn->self_handle)
{
+ DEBUG ("Avatar conflict! Received hash '%s' and our cache is '%s'",
+ sha1, presence->avatar_sha1 == NULL ? "<NULL>" : presence->avatar_sha1);
self_avatar_resolve_conflict (cache);
}
else
--
1.5.6.5
More information about the telepathy-commits
mailing list