telepathy-glib: Emit a new TpProtocol' s immutable properties as debug messages

Simon McVittie smcv at kemper.freedesktop.org
Mon Nov 11 09:23:28 PST 2013


Module: telepathy-glib
Branch: master
Commit: df8c7546c913398d072c76d5aaf9fc4a00a93b4f
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=df8c7546c913398d072c76d5aaf9fc4a00a93b4f

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon Oct 28 14:13:30 2013 +0000

Emit a new TpProtocol's immutable properties as debug messages

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71048
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>

---

 telepathy-glib/protocol.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c
index 9b23aab..1421327 100644
--- a/telepathy-glib/protocol.c
+++ b/telepathy-glib/protocol.c
@@ -512,7 +512,21 @@ tp_protocol_constructed (GObject *object)
     }
   else
     {
+      GHashTableIter iter;
+      gpointer k, v;
+
       DEBUG ("immutable properties already supplied");
+
+      g_hash_table_iter_init (&iter, self->priv->protocol_properties);
+
+      while (g_hash_table_iter_next (&iter, &k, &v))
+        {
+          gchar *printed;
+
+          printed = g_strdup_value_contents (v);
+          DEBUG ("%s = %s", (const gchar *) k, printed);
+          g_free (printed);
+        }
     }
 
   self->priv->protocol_struct.params = tp_protocol_params_from_param_specs (



More information about the telepathy-commits mailing list