diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-01-06 11:02:44 +0000 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-01-06 11:02:44 +0000 |
commit | 3567a310eb3b530987bd23df0f5d36a0b4014657 (patch) | |
tree | 9b4915506ae312d18c97b12a8443ac6a98a85441 | |
parent | 82c7eef57a72a2bc5f620827cc95f7a67eca2042 (diff) |
debug-sender: make sure messages added are UTF-8 validdebug-lender
Starts looking at: fd.o#31857
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | telepathy-glib/debug-sender.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/telepathy-glib/debug-sender.c b/telepathy-glib/debug-sender.c index 6acd0152b..e3aee4ab7 100644 --- a/telepathy-glib/debug-sender.c +++ b/telepathy-glib/debug-sender.c @@ -383,7 +383,7 @@ _tp_debug_sender_take (TpDebugSender *self, * * Adds a new message to the debug sender message queue. If the * #TpDebugSender:enabled property is set to %TRUE, then a NewDebugMessage - * signal will be fired too. + * signal will be fired too. @string must be UTF-8 valid. * * Since: 0.7.36 */ @@ -394,6 +394,10 @@ tp_debug_sender_add_message (TpDebugSender *self, GLogLevelFlags level, const gchar *string) { + /* In the distant future we should probably fix this up ourselves + * for sending over D-Bus. fd.o#31857 */ + g_return_if_fail (g_utf8_validate (string, -1, NULL)); + _tp_debug_sender_take (self, debug_message_new (timestamp, domain, level, string)); } |