[next] telepathy-glib: contact_avatar_retrieved: improve debug
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Tue Oct 29 14:31:37 CET 2013
Module: telepathy-glib
Branch: next
Commit: 2ab17fc417761a6595abf02bd3fd6afd10a7853c
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=2ab17fc417761a6595abf02bd3fd6afd10a7853c
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Oct 1 17:08:35 2013 +0100
contact_avatar_retrieved: improve debug
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70010
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
telepathy-glib/contact.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
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 */
More information about the telepathy-commits
mailing list