summaryrefslogtreecommitdiff
path: root/src/muc-factory.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-09-21 15:15:35 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-09-21 16:28:15 +0100
commitd693c4702fb9ab22e2bf3a4edba60e6dd7e4289a (patch)
treef537b52957d3a4f957ecb5729f6aef56234adeb8 /src/muc-factory.c
parent3769699b2b6b17a709e4d70c9fe1faee26a1f909 (diff)
downloadtelepathy-gabble-d693c4702fb9ab22e2bf3a4edba60e6dd7e4289a.tar.gz
various: use tp_clear_object, tp_clear_pointer more
Diffstat (limited to 'src/muc-factory.c')
-rw-r--r--src/muc-factory.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 08202433c..f87fb1132 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -884,24 +884,12 @@ gabble_muc_factory_close_all (GabbleMucFactory *self)
}
if (priv->queued_requests != NULL)
- {
- g_hash_table_foreach_steal (priv->queued_requests,
- cancel_queued_requests, self);
- g_hash_table_destroy (priv->queued_requests);
- priv->queued_requests = NULL;
- }
-
- if (priv->text_needed_for_tubes != NULL)
- {
- g_hash_table_destroy (priv->text_needed_for_tubes);
- priv->text_needed_for_tubes = NULL;
- }
+ g_hash_table_foreach_steal (priv->queued_requests,
+ cancel_queued_requests, self);
- if (priv->tubes_needed_for_tube != NULL)
- {
- g_hash_table_destroy (priv->tubes_needed_for_tube);
- priv->tubes_needed_for_tube = NULL;
- }
+ tp_clear_pointer (&priv->queued_requests, g_hash_table_destroy);
+ tp_clear_pointer (&priv->text_needed_for_tubes, g_hash_table_destroy);
+ tp_clear_pointer (&priv->tubes_needed_for_tube, g_hash_table_destroy);
/* Use a temporary variable because we don't want
* muc_channel_closed_cb or tubes_channel_closed_cb to remove the channel
@@ -927,9 +915,9 @@ gabble_muc_factory_close_all (GabbleMucFactory *self)
lm_connection_unregister_message_handler (priv->conn->lmconn,
priv->message_cb, LM_MESSAGE_TYPE_MESSAGE);
- lm_message_handler_unref (priv->message_cb);
- priv->message_cb = NULL;
}
+
+ tp_clear_pointer (&priv->message_cb, lm_message_handler_unref);
}