Patch written for "Presence not updated, when client disconencts from telepathy-salut"

Ajay Garg ajay at
Mon Jul 9 12:30:09 EDT 2012

On Mon, Jul 9, 2012 at 9:38 PM, Martin Langhoff
<martin.langhoff at>wrote:

> On Mon, Jul 9, 2012 at 10:49 AM, Ajay Garg <ajay at>
> wrote:
> > The patch link was embedded later into the email ::
> >
> Ah, thanks! Have you shown this patch to Avahi hackers?

Just sent them a notification :)

> Avahi-daemon has /etc/avahi/avahi-daemon.conf, which is read by
> load_config_file() in main.c . Perhaps that is better than
> +#define AVAHI_DEFAULT_TTL_HOST_NAME get_avahi_default_ttl_host_name()

Bang on !!!!

That was the first thing I had tried.

The "#defines" are needed in all the avahi-modules (avahi-core,
avahi-daemon, etc.), so it needs to have itself pre-processed from the
common "avahi-common" module. Thankfully, the two "#defines" are present in

This "avahi-common" is the basic common module, which is linked to other
modules (avahi-core, avahi-daemon, etc)

So far, so good.

But.. the problem starts now..

If the two additional values are read from the "static int
load_config_file(DaemonConfig *c)" method in "avahi-daemon/main.c" (via
"/etc/avahi/avahi-daemon.conf"), that does not work out.
Reason is that, because "avahi-daemon" requires "avahi-core" to complete
its linking process, whereas "avahi-core" would need "avahi-daemon" to
complete its linking process (since the two values will be read from the
context of "avahi-daemon").

That puts us in a catch-22 situation.

So, actually, the right place to load the complete config is in
"avahi-common" module; but as of now, even in F17, the "static int
load_config_file(DaemonConfig *c)" method resides in the "avahi-daemon"
module :\

Anyways, I loaded the two required variables (without needing the methods
of "avahi-daemon" module) from the context of "avahi-common".

> ?
> cheers,
> m
> --
>  martin.langhoff at
>  martin at -- Software Architect - OLPC
>  - ask interesting questions
>  - don't get distracted with shiny stuff  - working code first
>  -

Thanks and Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Devel mailing list