[avahi] Avahi Update-Event?

Florian Erfurth f.erfurth at reel-multimedia.com
Mon Mar 30 06:18:51 PDT 2009


Trent Lloyd schrieb:
> 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.
>   
Thank you very much! You helped me a lot! :)
cu Floh


More information about the avahi mailing list