[avahi] Initializing DBus

Lennart Poettering lennart at poettering.net
Thu Jul 15 12:55:44 PDT 2010


On Thu, 15.07.10 13:16, Ryan Martindale (ryanworkinghere at gmail.com) wrote:

> I am using Avahi in a multi-threaded environment and was noticing some
> sporadic crashes. I believe I have tracked the problem down to the fact that
> there is no dbus_threads_init_default() call made in Avahi. Should there be
> a call to this DBus function in Avahi by default? Or is it expected that the
> programmer should be aware enough to make the call to initialize DBus
> correctly if he uses it in a multi-threaded environment? (Making this call
> in my code has fixed my crashing issues.)

The avahi client libs are not thread safe, though threads aware. In fact
the same is true for the majority of well written unix libraries...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the avahi mailing list