"DBus Embedded" - a clean break
Havoc Pennington
hp at pobox.com
Thu Jan 20 11:56:01 PST 2011
Hi,
2011/1/20 Rémi Denis-Courmont <remi at remlab.net>:
> Bah, nobody is ever going to agree on the boundary between broken and evil.
The point is that libdbus and dbus-daemon do draw a boundary, so this
concept has to be understood to work with them. Maybe the details are
debatable.
> Better just drop all messages that are broken to the point that you cannot
> parse them, a.k.a. the (receiving half of the) Jon Postel principle.
You can't really do that... once a message is not well-formed, there's
often no way to locate the start of the next message, you have to give
up on the whole stream. Say a message has an unparseable header, well
that means you can't locate the body or the end of the message.
Sometimes you can do it, and in some cases dbus will just send an
error reply instead of dropping the stream when that is possible.
> That only works for fixed size elements, i.e. scalar types and composite types
> made only of scalars. If you need to know the size of an array, you end up
> iterating it twice...
Right. Yes, that would be better, most likely.
Havoc
More information about the dbus
mailing list