[Telepathy-commits] [telepathy-gabble/master] Fix: also cache the caps set when there is a verification string

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


20080512172306-a41c0-b75025aad5d4afa7df9d1c2e6256e1043e287296.gz
---
 src/presence-cache.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/presence-cache.c b/src/presence-cache.c
index c9d77b2..6f4faa0 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -215,7 +215,8 @@ capability_info_free (CapabilityInfo *info)
 
 static guint
 capability_info_recvd (GabblePresenceCache *cache, const gchar *node,
-        TpHandle handle, GabblePresenceCapabilities caps)
+        TpHandle handle, GabblePresenceCapabilities caps,
+        guint trust_inc)
 {
   CapabilityInfo *info = capability_info_get (cache, node, caps);
 
@@ -230,7 +231,7 @@ capability_info_recvd (GabblePresenceCache *cache, const gchar *node,
   if (!tp_intset_is_member (info->guys, handle))
     {
       tp_intset_add (info->guys, handle);
-      info->trust++;
+      info->trust += trust_inc;
     }
 
   return info->trust;
@@ -836,11 +837,13 @@ _caps_disco_cb (GabbleDisco *disco,
           /* TODO: send queries for waiters? */
           goto OUT;
         }
-        trust = CAPABILITY_BUNDLE_ENOUGH_TRUST;
+
+      trust = capability_info_recvd (cache, node, handle, caps,
+          CAPABILITY_BUNDLE_ENOUGH_TRUST);
     }
   else
     {
-      trust = capability_info_recvd (cache, node, handle, caps);
+      trust = capability_info_recvd (cache, node, handle, caps, 1);
     }
 
   for (i = waiters; NULL != i;)
-- 
1.5.6.3




More information about the Telepathy-commits mailing list