summaryrefslogtreecommitdiff
path: root/telepathy-glib
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2014-04-06 18:01:18 -0400
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-17 14:22:29 +0100
commite9174fe566a8fbd4c627ff574c594d6466c6a20d (patch)
tree59e150c34d37e8e7cc7a3dcecf0ecc27c334a15a /telepathy-glib
parent0b57d9e66ca25a5e6684751a23a88b91e719e3c6 (diff)
Tests: fix TpChannelManager implementations
They should remove the channel from their internal table before emitting channel-closed. That way foreach_channel() won't return closed channel from within channel-closed cb. Also fix a crash in example call-manager.c if foreach_channel() is called after close_all()
Diffstat (limited to 'telepathy-glib')
-rw-r--r--telepathy-glib/simple-password-manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/telepathy-glib/simple-password-manager.c b/telepathy-glib/simple-password-manager.c
index 7e38d0ebc..3d38cfdf3 100644
--- a/telepathy-glib/simple-password-manager.c
+++ b/telepathy-glib/simple-password-manager.c
@@ -300,10 +300,10 @@ static void
tp_simple_password_manager_channel_closed_cb (GObject *chan,
TpSimplePasswordManager *manager)
{
+ tp_clear_object (&manager->priv->channel);
+
tp_channel_manager_emit_channel_closed_for_object (
TP_CHANNEL_MANAGER (manager), TP_EXPORTABLE_CHANNEL (chan));
-
- tp_clear_object (&manager->priv->channel);
}
static void