#include <config.h>
#endif
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
#include <avahi-common/alternative.h>
#include <avahi-common/malloc.h>
#include <avahi-common/simple-watch.h>
avahi_log_debug("server state: %i", state);
if (state == AVAHI_SERVER_RUNNING) {
- create_service("gurke");
avahi_server_dump(avahi, dump_line, NULL);
} else if (state == AVAHI_SERVER_COLLISION) {
char *n;
avahi_elapse_time(&tv, 5000, 0);
poll_api->timeout_new(poll_api, &tv, rename_timeout_callback, avahi);
- for (;;)
- if (avahi_simple_poll_iterate(simple_poll, -1) != 0)
- break;
+ /* Evil, but the conformace test requires that*/
+ create_service("gurke");
+
+
+ avahi_simple_poll_loop(simple_poll);
if (group)
avahi_s_entry_group_free(group);