X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fconformance-test.c;h=4bcd691d5660a048407f95697fb8442fc0ddb329;hb=fd84f9ae1c1ccaf7090e0b4f8876948bea040117;hp=001bff13b05eddf6a28cdde62535846896a7132b;hpb=28d336020ca1f6dbb88d64cac3ffdd1a67ee3de7;p=catta diff --git a/avahi-core/conformance-test.c b/avahi-core/conformance-test.c index 001bff1..4bcd691 100644 --- a/avahi-core/conformance-test.c +++ b/avahi-core/conformance-test.c @@ -31,6 +31,7 @@ #include "core.h" #include "util.h" +#include "alternative.h" static gchar *name = NULL; static AvahiEntryGroup *group = NULL; @@ -68,7 +69,6 @@ static void create_service(gchar *t) { static gboolean rename_timeout(gpointer data) { - if (access("flag", F_OK) == 0) { create_service("New - Bonjour Service Name"); return FALSE; @@ -77,8 +77,6 @@ static gboolean rename_timeout(gpointer data) { return TRUE; } - - static void entry_group_callback(AvahiServer *s, AvahiEntryGroup *g, AvahiEntryGroupState state, gpointer userdata) { if (state == AVAHI_ENTRY_GROUP_COLLISION) create_service(NULL); @@ -88,10 +86,14 @@ static void entry_group_callback(AvahiServer *s, AvahiEntryGroup *g, AvahiEntryG } } +static void server_callback(AvahiServer *s, AvahiServerState state, gpointer userdata) { + g_message("server state: %i", state); +} + int main(int argc, char *argv[]) { GMainLoop *loop = NULL; - avahi = avahi_server_new(NULL); + avahi = avahi_server_new(NULL, NULL, server_callback, NULL); create_service("gurke"); avahi_server_dump(avahi, stdout);