[next] telepathy-glib: tp_connection_manager_check_valid_name: allow starting with underscore

Simon McVittie smcv at kemper.freedesktop.org
Fri Sep 27 06:23:45 PDT 2013


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

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu Sep 26 19:13:28 2013 +0100

tp_connection_manager_check_valid_name: allow starting with underscore

telepathy-spec 0.99.1 doesn't allow this, but 0.99.2 does.

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

---

 telepathy-glib/connection-manager.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index 72296c5..bba3a42 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -1564,11 +1564,11 @@ tp_connection_manager_check_valid_name (const gchar *name,
       return FALSE;
     }
 
-  if (!g_ascii_isalpha (name[0]))
+  if (!g_ascii_isalpha (name[0]) && *name_char != '_')
     {
       g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
           "Not a valid connection manager name because first character "
-          "is not an ASCII letter: %s", name);
+          "is not an ASCII letter or underscore: %s", name);
       return FALSE;
     }
 



More information about the telepathy-commits mailing list