[avahi] Avahi Update-Event?

Trent Lloyd lathiat at bur.st
Mon Mar 30 06:17:44 PDT 2009


Florian,

On 30/03/2009, at 7:36 PM, Florian Erfurth wrote:

> Trent Lloyd schrieb:
>> Browsers only subsribe to changes in services appearing/disappearing.
>>
> Ok.
>> What you need to do is start a service resolver on any services you
>> are interested
> You mean this?
> avahi_service_resolver_new(c, interface, protocol, name, type, domain,
> AVAHI_PROTO_INET/*only ipv4*/ , (AvahiLookupFlags)0,  
> resolve_callback, c)
>
>> and they will re-fire if the TXT records update (as
>> they subscribe to the TXT records also)
>>
>> Just make sure you don't destroy the resolver after receiving the
>> first event.
>>
> Do you mean I shouldn't do the following line?
> avahi_service_resolver_free(r);
> Then resolve_callback(...) will be refired?
>
> I never worked with avahi before, so an example source (like
> client-browse-services.c) would help me if there is some.

You are 100% correct on both accounts.

Trent


More information about the avahi mailing list