X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=examples%2Fclient-browse-services.c;h=5ebbf2d89dc5981fe3dd72d50dcaf2fc1f20521d;hb=6b391bb81f0dce0193a722254016b26c12a17643;hp=3bbed112fa9d56ce30a0c0d16fdec6cf4c978438;hpb=8b22b43669d936ab75914732209f93a0b7ee81f4;p=catta diff --git a/examples/client-browse-services.c b/examples/client-browse-services.c index 3bbed11..5ebbf2d 100644 --- a/examples/client-browse-services.c +++ b/examples/client-browse-services.c @@ -73,13 +73,15 @@ static void resolve_callback( "\tTXT=%s\n" "\tcookie is %u\n" "\tis_local: %i\n" + "\tour_own: %i\n" "\twide_area: %i\n" "\tmulticast: %i\n" "\tcached: %i\n", host_name, port, a, t, avahi_string_list_get_service_cookie(txt), - avahi_client_is_service_local(avahi_service_resolver_get_client(r), interface, protocol, name, type, domain), + !!(flags & AVAHI_LOOKUP_RESULT_LOCAL), + !!(flags & AVAHI_LOOKUP_RESULT_OUR_OWN), !!(flags & AVAHI_LOOKUP_RESULT_WIDE_AREA), !!(flags & AVAHI_LOOKUP_RESULT_MULTICAST), !!(flags & AVAHI_LOOKUP_RESULT_CACHED)); @@ -176,11 +178,9 @@ int main(int argc, char*argv[]) { fprintf(stderr, "Failed to create service browser: %s\n", avahi_strerror(avahi_client_errno(client))); goto fail; } - + /* Run the main loop */ - for (;;) - if (avahi_simple_poll_iterate(simple_poll, -1) != 0) - break; + avahi_simple_poll_loop(simple_poll); ret = 0;