diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2010-09-13 13:51:36 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2010-09-13 17:18:40 +0100 |
commit | fa8237da655cc7fe1da65f3a25506044badab83b (patch) | |
tree | 1202552fb0485631d8f49b33a0f374b1181f9dd1 /telepathy-glib/base-protocol.c | |
parent | af6016d4aa109aac8a86985135246bfdc070f9cc (diff) | |
download | telepathy-glib-fa8237da655cc7fe1da65f3a25506044badab83b.tar.gz |
BaseProtocol: DEBUG sanitized parameter values
In the Gabble test suite, there's a neat hack where the name of the test
being run is passed to Gabble in the 'account' parameter, but ignored
because the 'resource' is also set. This makes it easy to search for the
section of the debug output relating to a particular test.
The move to BaseProtocol meant the parameter values were no longer
logged. This patch adds them to a relevant debug message.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/base-protocol.c')
-rw-r--r-- | telepathy-glib/base-protocol.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/telepathy-glib/base-protocol.c b/telepathy-glib/base-protocol.c index 5b982a562..32bbc4c1d 100644 --- a/telepathy-glib/base-protocol.c +++ b/telepathy-glib/base-protocol.c @@ -1121,7 +1121,18 @@ tp_base_protocol_sanitize_parameters (TpBaseProtocol *self, G_VALUE_TYPE_NAME (coerced)); } - DEBUG ("using specified value for %s", name); + if (DEBUGGING) + { + gchar *to_free = NULL; + const gchar *contents = "<secret>"; + + if (!(parameters[i].flags & TP_CONN_MGR_PARAM_FLAG_SECRET)) + contents = to_free = g_strdup_value_contents (coerced); + + DEBUG ("using specified value for %s: %s", name, contents); + g_free (to_free); + } + g_hash_table_insert (combined, g_strdup (name), coerced); } else if ((parameters[i].flags & mandatory_flag) != 0) |