summaryrefslogtreecommitdiffstats
path: root/examples/client-browse-services.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-18 19:52:03 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-18 19:52:03 +0000
commit6b391bb81f0dce0193a722254016b26c12a17643 (patch)
tree913abdf1f71f07e4efbf0ab2d0590494f456f9fe /examples/client-browse-services.c
parent8b22b43669d936ab75914732209f93a0b7ee81f4 (diff)
* remove AVAHI_PUBLISH_IS_PROXY, it was a bad idea
* drop avahi_service_is_service_local(), avahi_client_is_service_local() * add new lookup result flags AVAHI_LOOKUP_RESULT_OUR_OWN and AVAHI_LOOKUP_RESULT_LOCAL * remove avahi_address_resolver_new() and replace it by avahi_address_resolver_new_a() * avahi-client: save query data in browse/resolve objects so that we can return it on failure * other cleanups git-svn-id: file:///home/lennart/svn/public/avahi/trunk@811 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'examples/client-browse-services.c')
-rw-r--r--examples/client-browse-services.c10
1 files changed, 5 insertions, 5 deletions
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;