diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-08-20 13:48:58 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-24 14:28:27 +0100 |
commit | b0a00c67c61b6b8287aee480d9f5aaa94d0f4979 (patch) | |
tree | 3d6678bcc64ad2570c48661c279a707bac1a25e3 /telepathy-glib/protocol.c | |
parent | 3aaacd5566e2edc602870f86e89a3961aff6363c (diff) | |
download | telepathy-glib-b0a00c67c61b6b8287aee480d9f5aaa94d0f4979.tar.gz |
TpConnectionManager, TpProtocol: improve debug output
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68390
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/protocol.c')
-rw-r--r-- | telepathy-glib/protocol.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c index e60005918..b2935c042 100644 --- a/telepathy-glib/protocol.c +++ b/telepathy-glib/protocol.c @@ -411,15 +411,22 @@ tp_protocol_check_for_core (TpProtocol *self) value = tp_asv_lookup (props, TP_PROP_PROTOCOL_CONNECTION_INTERFACES); if (value == NULL || !G_VALUE_HOLDS (value, G_TYPE_STRV)) - return FALSE; + { + DEBUG ("Interfaces not found"); + return FALSE; + } if (tp_asv_get_boxed (props, TP_PROP_PROTOCOL_REQUESTABLE_CHANNEL_CLASSES, TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST) == NULL) - return FALSE; + { + DEBUG ("Requestable channel classes not found"); + return FALSE; + } /* Interfaces has a sensible default, the empty list. * VCardField, EnglishName and Icon have a sensible default, "". */ + DEBUG ("Core feature ready"); return TRUE; } @@ -464,12 +471,20 @@ tp_protocol_constructed (GObject *object) g_assert (self->priv->protocol_struct.name != NULL); + DEBUG ("%s/%s: new Protocol", self->priv->cm_name, + self->priv->protocol_struct.name); + if (self->priv->protocol_properties == NULL) { + DEBUG ("immutable properties not supplied"); had_immutables = FALSE; self->priv->protocol_properties = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) tp_g_value_slice_free); } + else + { + DEBUG ("immutable properties already supplied"); + } self->priv->protocol_struct.params = tp_protocol_params_from_param_specs ( tp_asv_get_boxed (self->priv->protocol_properties, @@ -1529,10 +1544,12 @@ _tp_protocol_parse_manager_file (GKeyFile *file, if (!tp_connection_manager_check_valid_protocol_name (name, NULL)) { - DEBUG ("Protocol '%s' has an invalid name", name); + DEBUG ("%s: protocol '%s' has an invalid name", cm_debug_name, name); return NULL; } + DEBUG ("%s: reading protocol '%s' from manager file", cm_debug_name, name); + keys = g_key_file_get_keys (file, group, NULL, NULL); i = 0; |