X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-core%2Fconformance-test.c;h=dc3c864eb7b13465f98c1e0d737052be0a818f87;hb=cce02bf638894512769ff026f5702c3e892a20f1;hp=6873b5cda1a9b7cb4f3ddae69457abc3891db457;hpb=854f901f491ccda79aee11edc3d59109cb229d28;p=catta diff --git a/avahi-core/conformance-test.c b/avahi-core/conformance-test.c index 6873b5c..dc3c864 100644 --- a/avahi-core/conformance-test.c +++ b/avahi-core/conformance-test.c @@ -23,14 +23,16 @@ #include #endif -#include -#include -#include #include #include #include #include +#include +#include +#include +#include + #include #include #include @@ -107,7 +109,6 @@ static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UN 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; @@ -143,9 +144,11 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { 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);