X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=examples%2Fpublish-service.c;h=6132622e52f6972d0eb8251f03391cd38c0c47d5;hb=d0c6f66e03793c19c034c26c1267f9382167b3ad;hp=4a78402bcdb772b5aa3867b6c561c1a847618bbe;hpb=4f0a5e7572a4257894b4bfede42c26d65152609e;p=catta diff --git a/examples/publish-service.c b/examples/publish-service.c index 4a78402..6132622 100644 --- a/examples/publish-service.c +++ b/examples/publish-service.c @@ -32,13 +32,13 @@ #include #include -static AvahiEntryGroup *group = NULL; +static AvahiSEntryGroup *group = NULL; static AvahiSimplePoll *simple_poll = NULL; static char *name = NULL; static void create_services(AvahiServer *s); -static void entry_group_callback(AvahiServer *s, AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata) { +static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void *userdata) { assert(s); assert(g == group); @@ -70,7 +70,7 @@ static void create_services(AvahiServer *s) { /* If this is the first time we're called, let's create a new entry group */ if (!group) { - if (!(group = avahi_entry_group_new(s, entry_group_callback, NULL))) { + if (!(group = avahi_s_entry_group_new(s, entry_group_callback, NULL))) { fprintf(stderr, "avahi_entry_group_new() failed: %s\n", avahi_strerror(avahi_server_errno(s))); goto fail; } @@ -94,7 +94,7 @@ static void create_services(AvahiServer *s) { } /* Tell the server to register the service */ - if ((ret = avahi_entry_group_commit(group)) < 0) { + if ((ret = avahi_s_entry_group_commit(group)) < 0) { fprintf(stderr, "Failed to commit entry_group: %s\n", avahi_strerror(ret)); goto fail; } @@ -137,7 +137,7 @@ static void server_callback(AvahiServer *s, AvahiServerState state, void * userd * in AVAHI_SERVER_RUNNING state we will register them * again with the new host name. */ if (group) - avahi_entry_group_reset(group); + avahi_s_entry_group_reset(group); } } @@ -186,7 +186,7 @@ fail: /* Cleanup things */ if (group) - avahi_entry_group_free(group); + avahi_s_entry_group_free(group); if (server) avahi_server_free(server);