Re: Contradiction in bus names naming in D-Bus spec

Igor Plastov <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <CAGTgnLfm79Txs6YZXsF+Je0HN1jWRHsYMyN6QOvweW_UserjsA@mail.gmail.com>
Glib for Windows:

 gboolean name_ok = false;

    g_print("Glib version %i.%i.%i for Windows.\n", glib_major_version,

            glib_minor_version, glib_micro_version);


    gchar* name=":"; // Шинное имя процесса.

    name_ok = g_dbus_is_name(name);

    g_print("Process bus name <%s> check: <%s>\n",name, name_ok   ?
"good" : "bad" );


    name=":.a"; // Шинное имя процесса.

    name_ok = g_dbus_is_name(name);

    g_print("Process bus name <%s> check: <%s>\n", name, name_ok   ?
"good" : "bad" );


Output:


Glib version 2.44.1 for Windows.

Process bus name <:> check: <bad>

Process bus name <:.a> check: <good>



ср, 3 февр. 2021 г. в 03:36, Thiago Macieira <[email protected]>:

> On Monday, 1 February 2021 07:25:43 PST Igor Plastov wrote:
> > Just ":" is also valid:
> > ~# python3 -ic "import dbussy"
> >
> > >>> dbussy.validate_bus_name(":")
> >
> > True
> >
> > It looks strange.
>
> Those are unique connection names and can only be created by the bus. One
> must
> assume that the bus only creates valid names for itself.
>
> The implementation I have in QDBusUtil::isValidUniqueConnectionName()
> would
> return false for ":" and ":.a" though.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>    Software Architect - Intel DPG Cloud Engineering
>
>
>
>

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.