Re: Contradiction in bus names naming in D-Bus spec
Bogdan Lotko <[email protected]>
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Message-ID | <[email protected]> |
Hello,
According to the given description the "a" is obviously incorrect.
Much more interesting question is are the "a." or ".a" legal?
One element can't be "separated by a period", so probably the correct sentence shall be
> **Bus names are composed of *2* or more elements separated by a period
> ('.') character.
with best regards,
BL
On 01/31/2021 11:01 PM, Lawrence D'Oliveiro wrote:
> On Sun, 31 Jan 2021 15:15:31 +0300, Igor Plastov wrote:
>
>> It looks like I had found contradiction in bus names rules (
>> https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages),
>> 2nd naming rule says:
>> **Bus names are composed of 1 or more elements separated by a period
>> ('.') character. All elements must contain at least one character.*
>>
>> 4th naming rules:
>> **Bus names must contain at least one '.' (period) character (and
>> thus at least two elements). *
>>
>> What is the right way of understanding of this two rules?
> Follow what libdbus does. It is the reference implementation, after all:
>
> ldo@theon:~> python3 -ic "import dbussy"
> >>> dbussy.validate_bus_name("a.b")
> True
> >>> dbussy.validate_bus_name("a")
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/ldo/projects/dbussy/dbussy.py", line 5826, in validate_bus_name
> my_error.raise_if_set()
> File "/home/ldo/projects/dbussy/dbussy.py", line 5035, in raise_if_set
> raise DBusError(self.name, self.message)
> dbussy.DBusError: org.freedesktop.DBus.Error.InvalidArgs -- Bus name was not valid: 'a'
> _______________________________________________
> dbus mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dbus
--
*Bogdan Lotko*
[email protected]
Phone: +43 1 2852458
Mobile: +43 676 6615012
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
signature.asc
(application/pgp-signature, 835 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iQIcBAEBAgAGBQJgFysGAAoJEO4HuQJ0qOU/0YkQAJTnTsIw5A+muj26K0vnKPYT KBWaQsjSumUlR0nD0G8tn9DNPSrekmuBqoVZ+qRPlHoLtIxuF8KSlVlR/xegQQgr vtPp2wDWOkPfe/DdPLIaBUamnik8tHhMFmoGRsdsXyADpsywckMwheqFDnBWfvYU dzqhuP9vOA5F96RdbCukaVyJeJ9PqltqrExhQ58Jon4jMZCEe029gw5Iq1fKSyAZ aicTyWpHi2ke/1Jw9oOh2Q7GvJrGwiYK67Azyd1NSFbMNAcdiilu98eJaO1dxAUu Fg/Z94vZv5ZMqtKCImXCaWH+Vwg1jVTCBBYi69+0joQj5o4FQOim2FmaccKjyNVV 9aHh6FFQiKc+iNTpyLcM8iaBAfOZd5M86U7wKQm3SsrJjAb31t8t2Y//ZEC5TypQ 3cuQ422V9oQ395CpnvKr/Hr73k9VzFA6uCP1HWgVD5oNQ+Ty3sORzDJBPi+7O3m/ b1GVeRpE/zBtUTU3pNHmRvL2KiE4tnAmqwwS6tVDYJKTO9QqPzAgH+Xu4nJbQLUM GjdxuimTUxy8Y0vCm+VHOWjAX8r3HbN1tBpi8qMjeRzTvo6Y5xou9+XMUr1Bu44I mq1Hf5GUtXBaXhYfWEpCwoJxYHUmNJ9+ji3VYYlShS7yLz1moh60uZPPm6UEeyRs 45arBGPrbv6qdJP6Syig =hahK -----END PGP SIGNATURE-----