From 6394701cf8a57f2ef9a18070d1c0a7f5a90bcf66 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 1 Oct 2013 17:08:35 +0100 Subject: [PATCH 3/4] contact_avatar_retrieved: improve debug --- telepathy-glib/contact.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c index 8085590..3db27ee 100644 --- a/telepathy-glib/contact.c +++ b/telepathy-glib/contact.c @@ -2895,6 +2895,15 @@ contact_avatar_retrieved (TpConnection *connection, gchar *mime_filename; WriteAvatarData *avatar_data; + DEBUG ("token '%s', %u bytes, MIME type '%s'", + token, avatar->len, mime_type); + + if (self == NULL) + DEBUG ("handle #%u is not associated with any TpContact", handle); + else + DEBUG ("used by contact #%u '%s'", handle, + tp_contact_get_identifier (self)); + if (self != NULL) { /* Update the avatar token if a newer one is given @@ -2904,7 +2913,10 @@ contact_avatar_retrieved (TpConnection *connection, if (!build_avatar_filename (connection, token, TRUE, &filename, &mime_filename)) - return; + { + DEBUG ("failed to set up cache"); + return; + } /* Save avatar in cache, even if the contact is unknown, to avoid as much as * possible future avatar requests */ -- 1.8.4.rc3