[avahi] Differences between core and client api examples

Lennart Poettering lennart at poettering.net
Thu Aug 28 05:56:50 PDT 2008

On Thu, 28.08.08 07:34, David Lambert (dave at lambsys.com) wrote:

> Please could someone explain the reason for the following code, copied 
> from the example client-publish-service.c? There does not appear to be a 
> counterpart int the core-publish-service.c:
>     /* After 10s do some weird modification to the service */
>     avahi_simple_poll_get(simple_poll)->timeout_new(
>         avahi_simple_poll_get(simple_poll),
>         avahi_elapse_time(&tv, 1000*10, 0),
>         modify_callback,
>         client);

This installs a time event in the event loop that is triggered after
10s. The point of this is to show how you can modify an existing
service. The interesting part is the code of modify_callback(). This
call merely makes sure that that specific function called. That's all.


Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

More information about the avahi mailing list