loop

Havoc Pennington hp at pobox.com
Mon Jun 30 16:03:31 PDT 2008


Hi,

On Mon, Jun 30, 2008 at 4:41 PM, Fritz Code <codefritz at googlemail.com> wrote:
> Well I can check if the message DiscoveryCompleted could be sent probably,
> but if it gets lost on the bus or the bus crashes then
> this construct ends up in an infinite loop. How likely is this scenario of
> an infinite loop?

If the bus crashes you'll get a Disconnected message (or libdbus will
exit the app for you, if you didn't call
dbus_connection_set_exit_on_disconnect()). If the bus doesn't crash,
and the DiscoveryCompleted message is sent to you, then either you
will receive it or the sender will get an error back about
out-of-memory or whatever happened - the message can't be silently
lost. The errors are very unlikely, out-of-memory (or exceeding
resource limits) are the only possible errors.

Anyway, messages should never be silently lost, but the connection can
be disconnected, and errors can be returned to sender if there aren't
resources to send the message.

Havoc


More information about the dbus mailing list