<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello,<br>
<br>
According to the given description the "a" is obviously incorrect.<br>
Much more interesting question is are the "a." or ".a" legal?<br>
One element can't be "separated by a period", so probably the
correct sentence shall be <br>
<blockquote type="cite">
<pre wrap="">**Bus names are composed of <b>2</b> or more elements separated by a period
('.') character.</pre>
</blockquote>
<br>
with best regards,<br>
<br>
BL<br>
<br>
<br>
<br>
On 01/31/2021 11:01 PM, Lawrence D'Oliveiro wrote:<br>
</div>
<blockquote
cite="mid:20210201110148.2128f6ae@theon.geek-central.gen.nz"
type="cite">
<pre wrap="">On Sun, 31 Jan 2021 15:15:31 +0300, Igor Plastov wrote:
</pre>
<blockquote type="cite">
<pre wrap="">It looks like I had found contradiction in bus names rules (
<a class="moz-txt-link-freetext" href="https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages">https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages</a>),
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?
</pre>
</blockquote>
<pre wrap="">
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
<a class="moz-txt-link-abbreviated" href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/dbus">https://lists.freedesktop.org/mailman/listinfo/dbus</a>
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<p><b>Bogdan Lotko</b></p>
<a class="moz-txt-link-abbreviated" href="mailto:bogdan@lotko.at">bogdan@lotko.at</a>
<br>
Phone: +43 1 2852458
<br>
Mobile: +43 676 6615012</div>
</body>
</html>