[telepathy-gabble/master] Emit capabilities-discovered for the correct handle.

Will Thompson will.thompson at collabora.co.uk
Tue May 12 03:06:04 PDT 2009


Previously, suppose contacts x and y have the same caps hash, and we
discoed x. When x replied, we'd satisfy both waiters, but emit
capabilities-discovered(x) for both. This should have made
RequestStreams erroneously never terminate in some cases (it's waiting
for caps that apparently never arrive) were it not for a bug in its
capabilities-discovered callback ...
---
 src/presence-cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/presence-cache.c b/src/presence-cache.c
index d42eef8..b03183c 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -1095,8 +1095,8 @@ _caps_disco_cb (GabbleDisco *disco,
           g_hash_table_steal (priv->disco_pending, node);
           g_hash_table_insert (priv->disco_pending, key, waiters);
 
+          g_signal_emit (cache, signals[CAPABILITIES_DISCOVERED], 0, waiter->handle);
           disco_waiter_free (waiter);
-          g_signal_emit (cache, signals[CAPABILITIES_DISCOVERED], 0, handle);
         }
       else if (trust + disco_waiter_list_get_request_count (waiters) - trust_inc
           < CAPABILITY_BUNDLE_ENOUGH_TRUST)
-- 
1.5.6.5




More information about the telepathy-commits mailing list