[avahi] Do I need to do the avahi_service_resolver_free

Arhold arhold at gmail.com
Wed Dec 19 17:06:23 PST 2007

Hi Lennart,

Thanks for your reply. It's very helpful.

I think our case belongs to the exceptions where the constant monitoring is
neccessory. So we will need to keep AvahiServiceResolver around.

My further question is, when will the AvahiServiceResolver be free. Do I
need to release the resolver somewhere in my application or  avahi itself
will manage those resolvers?


On Dec 18, 2007 2:28 AM, Lennart Poettering <lennart at poettering.net> wrote:

> On Fri, 30.11.07 15:21, Arhold (arhold at gmail.com) wrote:
> Hi!
> > In this scenario - service unreachable and then recovered, which is the
> > right way to handle in browser side? Is it necessary to call
> > avahi_service_resolver_free when AVAHI_RESOLVER_FAILURE? I try to remove
> > that code and when the netif was recovered, the browser will be able t o
> get
> > the service again.
> If you keep the AvahiServiceResolver object around after having
> event, then you will be notified whenever the service
> disappears/reappers/changes. It is perfectly valid to keep the
> resolver around for applications which want to constantly monitor a
> service and its service data.
> Please note however, that usually resolving a service is a "one-shot"
> thing, i.e. it should only be issued when actually connecting to a
> service, and not already when discovering it. There are only very few
> exceptions where the constant monitoring makes sense, one of them
> being iChat's _presence._tcp.
> I hope this answers your question. I didn't fully understood your
> problem, so if this does not answer your question, feel free to ask
> again.
> Lennart
> --
> Lennart Poettering                        Red Hat, Inc.
> lennart [at] poettering [dot] net         ICQ# 11060553
> http://0pointer.net/lennart/           GnuPG 0x1A015CC4
> _______________________________________________
> avahi mailing list
> avahi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/avahi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/avahi/attachments/20071220/21aa4711/attachment.html 

More information about the avahi mailing list