[avahi] Avahi 0.6.27

Lennart Poettering lennart at poettering.net
Wed Aug 4 08:36:34 PDT 2010


On Wed, 04.08.10 16:28, Stanislav Gutev (stanislav.gutev at dfki.de) wrote:

> Hello,
> 
> could someone please explain to me what is the reason for the following
> change in avahi-client/client.c:
> 
> 562,564c563
> <
> <     if (!(dbus_bus_name_has_owner(client->bus, AVAHI_DBUS_NAME, &error))
> ||
> <         dbus_error_is_set(&error)) {
> ---
> >     if (!dbus_bus_start_service_by_name(client->bus, AVAHI_DBUS_NAME, 0,
> NULL, &error)) {
> 
> For some reason, when using the second method, the client doesnt find the
> running daemon, but if I try it with the previous one, it works properly.
> 
> Thank you in advance.

Well, we changed this in context of systemd: we want to make it possible
to activate avahi only on demand, i.e. when at least one of the
following three triggers are triggered:

1) a dbus client talks to the service
2) a network is configured
3) somebody connects to the simple protocol socket

To make this possible we had to change a few things and instead of
having the client libs check whether avahi is around we just activate it
and see if this works.

There are three possible fixes:

1) the dirty one, just install org.fd.Avahi.service into
/usr/share/dbus-1/system-services/ even if you are not running systemd. 

2) fix d-bus to not return an error when we try to manually activate a
service that is running but not activatable

3) fix avahi-client to just call org.fd.DBus.Ping on the service instead
of anything else, which should do what is requested.

Hppy to take patches for #3.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the avahi mailing list