[telepathy-mission-control/master] McdConnection: debug when channels appear
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Mar 27 11:51:21 PDT 2009
---
src/mcd-connection.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 4a8a8c7..ff2a163 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -466,6 +466,10 @@ on_new_channel (TpConnection *proxy, const gchar *chan_obj_path,
McdConnectionPrivate *priv = user_data;
McdChannel *channel;
+ DEBUG ("%s (t=%s, ht=%u, h=%u, suppress=%c)",
+ chan_obj_path, chan_type, handle_type, handle,
+ suppress_handler ? 'T' : 'F');
+
/* ignore all our own requests (they have always suppress_handler = 1) as
* well as other requests for which our intervention has not been requested
* */
@@ -1266,6 +1270,30 @@ on_new_channels (TpConnection *proxy, const GPtrArray *channels,
gboolean requested = FALSE;
guint i;
+ if (DEBUGGING)
+ {
+ for (i = 0; i < channels->len; i++)
+ {
+ GValueArray *va = g_ptr_array_index (channels, i);
+ const gchar *object_path = g_value_get_boxed (va->values);
+ GHashTable *props = g_value_get_boxed (va->values + 1);
+ GHashTableIter iter;
+ gpointer k, v;
+
+ DEBUG ("%s", object_path);
+
+ g_hash_table_iter_init (&iter, props);
+
+ while (g_hash_table_iter_next (&iter, &k, &v))
+ {
+ gchar *repr = g_strdup_value_contents (v);
+
+ DEBUG(" \"%s\" => %s", (const gchar *) k, repr);
+ g_free (repr);
+ }
+ }
+ }
+
/* we can completely ignore the channels that arrive while can_dispatch is
* FALSE: the on_new_channel handler is already recording them */
if (!priv->can_dispatch) return;
--
1.5.6.5
More information about the telepathy-commits
mailing list