[Pkg-telepathy-commits] [telepathy-glib] 23/111: contact_avatar_retrieved: improve debug

Simon McVittie smcv at debian.org
Wed Mar 19 18:07:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-glib.

commit 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 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 */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-glib.git



More information about the Pkg-telepathy-commits mailing list