[Telepathy-commits] [telepathy-gabble/master] Debugs

Alban Crequy alban.crequy at collabora.co.uk
Tue Aug 19 10:52:43 PDT 2008


20080512160042-a41c0-84e8502c182dcc22056693478060d9b7a44fa002.gz
---
 src/gabble-connection.c |    6 ++++++
 src/presence-cache.c    |    8 +++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/gabble-connection.c b/src/gabble-connection.c
index 2eded54..e51d6db 100644
--- a/src/gabble-connection.c
+++ b/src/gabble-connection.c
@@ -2049,9 +2049,13 @@ _emit_capabilities_changed (GabbleConnection *conn,
   const CapabilityConversionData *ccd;
   guint i;
 
+  DEBUG ("Called.");
+
   if (old_caps == new_caps)
     return;
 
+  DEBUG ("caps changed.");
+
   caps_arr = g_ptr_array_new ();
 
   for (ccd = capabilities_conversions; NULL != ccd->iface; ccd++)
@@ -2090,6 +2094,7 @@ _emit_capabilities_changed (GabbleConnection *conn,
         }
     }
 
+  DEBUG ("caps_arr->len=%d", caps_arr->len);
   if (caps_arr->len)
     tp_svc_connection_interface_capabilities_emit_capabilities_changed (
         conn, caps_arr);
@@ -2112,6 +2117,7 @@ connection_capabilities_update_cb (GabblePresenceCache *cache,
 {
   GabbleConnection *conn = GABBLE_CONNECTION (user_data);
 
+  DEBUG ("Called.");
   _emit_capabilities_changed (conn, handle, old_caps, new_caps);
 }
 
diff --git a/src/presence-cache.c b/src/presence-cache.c
index 7a90c5c..d79e2f9 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -867,7 +867,8 @@ _caps_disco_cb (GabbleDisco *disco,
           if (presence)
           {
             GabblePresenceCapabilities save_caps = presence->caps;
-            DEBUG ("setting caps for %d (%s) to %d", handle, jid, caps);
+            DEBUG ("setting caps for %d (%s) to %d (save_caps %d)",
+                handle, jid, caps, save_caps);
             gabble_presence_set_capabilities (presence, waiter->resource,caps,
               waiter->serial);
             DEBUG ("caps for %d (%s) now %d", handle, jid, presence->caps);
@@ -944,6 +945,9 @@ _process_caps_uri (GabblePresenceCache *cache,
   GabblePresenceCachePrivate *priv;
   TpHandleRepoIface *contact_repo;
 
+  DEBUG ("Called with from='%s' uri='%s' hash='%s' ver='%s'",
+      from, uri, hash, ver);
+
   priv = GABBLE_PRESENCE_CACHE_PRIV (cache);
   contact_repo = tp_base_connection_get_handles (
       (TpBaseConnection *)priv->conn, TP_HANDLE_TYPE_CONTACT);
@@ -1002,6 +1006,7 @@ _process_caps_uri (GabblePresenceCache *cache,
       waiters = (GSList *) value;
       waiter = disco_waiter_new (contact_repo, handle, resource,
           hash, ver, serial);
+      DEBUG ("New disco waiter %p: hash='%s' ver='%s'", waiter, hash, ver);
       waiters = g_slist_prepend (waiters, waiter);
       g_hash_table_insert (priv->disco_pending, key, waiters);
 
@@ -1044,6 +1049,7 @@ _process_caps (GabblePresenceCache *cache,
     resource++;
 
   uris = _extract_cap_bundles (lm_node, &hash, &ver);
+  DEBUG ("_extract_cap_bundles get hash='%s' ver='%s'", hash, ver);
 
   if (presence)
       old_caps = presence->caps;
-- 
1.5.6.3




More information about the Telepathy-commits mailing list