diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2009-01-06 15:30:47 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2009-01-07 18:57:49 +0000 |
commit | bf7d85172686fe338bff33dd054af68f8eac40df (patch) | |
tree | 075e4b30b1c44b4002605d5f8c86f91bdfac3bb9 /telepathy-glib/group-mixin.c | |
parent | 824ba89afa49137f95c60c430959a8562b67abc5 (diff) | |
download | telepathy-glib-bf7d85172686fe338bff33dd054af68f8eac40df.tar.gz |
Ensure all group flags are printed in mixin's debug output
The stringification code has a case for the first eight members of the
TpChannelGroupFlags enum, but didn't do anything with any unhandled
flags.
Diffstat (limited to 'telepathy-glib/group-mixin.c')
-rw-r--r-- | telepathy-glib/group-mixin.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/telepathy-glib/group-mixin.c b/telepathy-glib/group-mixin.c index 2025d1c0c..7bb2980be 100644 --- a/telepathy-glib/group-mixin.c +++ b/telepathy-glib/group-mixin.c @@ -1100,6 +1100,7 @@ tp_group_mixin_get_handle_owners_async (TpSvcChannelInterfaceGroup *obj, if (i++ > 0) \ g_string_append (str, "|"); \ g_string_append (str, #flag + 22); \ + flags &= ~flag; \ } static gchar * @@ -1119,6 +1120,17 @@ group_flags_to_string (TpChannelGroupFlags flags) GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_MESSAGE_REJECT); GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_MESSAGE_RESCIND); + /* Print out any remaining flags that weren't removed in the above cases + * numerically. + */ + if (flags != 0) + { + if (i > 0) + g_string_append (str, "|"); + + g_string_append_printf (str, "%u", flags); + } + g_string_append (str, TP_ANSI_BOLD_ON "]"); return g_string_free (str, FALSE); |