diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2012-11-05 16:06:06 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2012-11-05 16:06:06 +0000 |
commit | d300a2e432294c77a55cdc45cd5d7b3f653e13ff (patch) | |
tree | 8e71619d095b56dd0321db6deef8dcf5d441672e /src/muc-factory.c | |
parent | 5f262b5741724c0210f51e07691ba830682f5f25 (diff) | |
download | telepathy-gabble-d300a2e432294c77a55cdc45cd5d7b3f653e13ff.tar.gz |
muc-factory: clarify cancelling queued requests.
Diffstat (limited to 'src/muc-factory.c')
-rw-r--r-- | src/muc-factory.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/muc-factory.c b/src/muc-factory.c index 7213effec..011957130 100644 --- a/src/muc-factory.c +++ b/src/muc-factory.c @@ -861,13 +861,11 @@ gabble_muc_factory_associate_request (GabbleMucFactory *self, } -static gboolean -cancel_queued_requests (gpointer k, - gpointer v, - gpointer d) +static void +cancel_queued_requests ( + GabbleMucFactory *self, + GSList *requests_satisfied) { - GabbleMucFactory *self = GABBLE_MUC_FACTORY (d); - GSList *requests_satisfied = v; GSList *iter; requests_satisfied = g_slist_reverse (requests_satisfied); @@ -880,8 +878,6 @@ cancel_queued_requests (gpointer k, } g_slist_free (requests_satisfied); - - return TRUE; } @@ -900,8 +896,17 @@ gabble_muc_factory_close_all (GabbleMucFactory *self) } if (priv->queued_requests != NULL) - g_hash_table_foreach_steal (priv->queued_requests, - cancel_queued_requests, self); + { + GHashTableIter iter; + gpointer value; + + g_hash_table_iter_init (&iter, priv->queued_requests); + while (g_hash_table_iter_next (&iter, NULL, &value)) + { + cancel_queued_requests (self, value); + g_hash_table_iter_steal (&iter); + } + } tp_clear_pointer (&priv->queued_requests, g_hash_table_unref); tp_clear_pointer (&priv->text_needed_for_tube, g_hash_table_unref); |