From 46dc4b38e7c6a255c4180ddcd8e0d32524a232eb Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 25 Jul 2007 16:20:05 +0000 Subject: Adding more debug output. 2007-07-25 Xavier Claessens * libempathy/empathy-filter.c: Adding more debug output. svn path=/trunk/; revision=192 --- ChangeLog | 4 ++++ libempathy/empathy-filter.c | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37aefc9b6..fd230be5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-07-25 Xavier Claessens + + * libempathy/empathy-filter.c: Adding more debug output. + 2007-07-25 Xavier Claessens * libempathy/empathy-tp-contact-list.c: Add a check to be sure the diff --git a/libempathy/empathy-filter.c b/libempathy/empathy-filter.c index c811991f5..d916b60dd 100644 --- a/libempathy/empathy-filter.c +++ b/libempathy/empathy-filter.c @@ -184,13 +184,18 @@ empathy_filter_process (EmpathyFilter *filter, EmpathyFilterPriv *priv; guint id; + g_return_if_fail (EMPATHY_IS_FILTER (filter)); + g_return_if_fail (TELEPATHY_IS_CHAN (tp_chan)); + priv = GET_PRIV (filter); id = GPOINTER_TO_UINT (g_hash_table_lookup (priv->table, tp_chan)); - if (id != 0) { - g_signal_emit (filter, signals[PROCESS], 0, id, process); - g_hash_table_remove (priv->table, tp_chan); - } + g_return_if_fail (id != 0); + + empathy_debug (DEBUG_DOMAIN, "Processing channel id %d: %s", + id, process ? "Yes" : "No"); + g_signal_emit (filter, signals[PROCESS], 0, id, process); + g_hash_table_remove (priv->table, tp_chan); } static gboolean @@ -223,6 +228,7 @@ empathy_filter_filter_channel (EmpathyFilter *filter, g_hash_table_insert (priv->table, tp_chan, GUINT_TO_POINTER (id)); + empathy_debug (DEBUG_DOMAIN, "New channel to be filtred: %d", id); g_signal_emit (filter, signals[NEW_CHANNEL], 0, tp_conn, tp_chan); g_object_unref (tp_conn); -- cgit v1.2.3