From 3eb75be60eb89093e72a13edcf8793146f4dfb27 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 26 Sep 2013 19:01:12 +0100 Subject: [PATCH 1/4] Allow protocol names to start with "_", because tp-spec 0.99.1 says so --- telepathy-glib/connection-manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c index bb8b536..72296c5 100644 --- a/telepathy-glib/connection-manager.c +++ b/telepathy-glib/connection-manager.c @@ -1594,7 +1594,7 @@ tp_connection_manager_check_valid_name (const gchar *name, * * Check that the given string is a valid protocol name, i.e. that * it consists entirely of ASCII letters, digits and hyphen/minus, and starts - * with a letter. + * with a letter or underscore. * * Returns: %TRUE if @name is valid * @@ -1613,11 +1613,11 @@ tp_connection_manager_check_valid_protocol_name (const gchar *name, return FALSE; } - if (!g_ascii_isalpha (name[0])) + if (!g_ascii_isalpha (name[0]) && name[0] != '_') { g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Not a valid protocol name because first character " - "is not an ASCII letter: %s", name); + "is not an ASCII letter or underscore: %s", name); return FALSE; } -- 1.8.4.rc3