[Telepathy] [Fwd: Problem with account in tpqt4]

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Feb 17 10:21:57 PST 2009


(Taking this to the mailing list, there's no reason why this should be
in private mail.)

Dariusz wrote:
> --- account.cpp 2009-02-17 01:49:44.000000000 +0100
> +++ _account.cpp        2009-02-17 01:49:39.000000000 +0100
> @@ -112,9 +112,9 @@
>     // FIXME: QRegExp probably isn't the most efficient possible way to  
> parse
>     //        this :-)
>     QRegExp rx("^" TELEPATHY_ACCOUNT_OBJECT_PATH_BASE
> -               "/([_A-Za-z][_A-Za-z0-9]*)"  // cap(1) is the CM
> -               "/([_A-Za-z][_A-Za-z0-9]*)"  // cap(2) is the protocol
> -               "/([_A-Za-z][_A-Za-z0-9]*)"  // account-specific part
> +               "/([_A-Za-z0-9]*)"  // cap(1) is the CM
> +               "/([_A-Za-z0-9]*)"  // cap(2) is the protocol
> +               "/([_A-Za-z0-9]*)$"  // account-specific part
>                );

What account manager are you using? It's not telepathy-spec-compliant.
Quoting from the spec:

"""
The object path of an Account MUST take the form
/org/freedesktop/Telepathy/Account/cm/proto/acct, where:

# cm is the same Connection_Manager_Name  that appears in the connection
  manager's well-known bus name and object path
# proto is the Protocol name as seen in ConnectionManager.ListProtocols,
  but with "-" replaced with "_" (i.e. the same as in the object-path of
  a Connection)
# acct is an arbitrary string of ASCII letters, digits and underscores,
  starting with a letter or underscore, which uniquely identifies this
  account
"""

Following the cross-references, cm must start with a letter, proto must start
with a letter, and acct must start with a letter or underscore, so the regex
is already less restrictive than it ought to be.

Which part fails to match, with which AM implementation and CM, and how does
that AM implementation generate object paths?

    Simon


More information about the telepathy mailing list