diff options
Diffstat (limited to 'avahi-core/conformance-test.c')
-rw-r--r-- | avahi-core/conformance-test.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/avahi-core/conformance-test.c b/avahi-core/conformance-test.c index 74c3833..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, NULL); + avahi = avahi_server_new(NULL, NULL, server_callback, NULL); create_service("gurke"); avahi_server_dump(avahi, stdout); |