diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-10-12 02:37:08 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-10-12 02:37:08 +0000 |
commit | bb14e0a8aa3173c8a6d80b1a9c8b300a452ee9f1 (patch) | |
tree | d29ec90346b7523aa877207ae29e461b767460c6 /examples/client-browse-services.c | |
parent | 7484feb19b10878042dcb8cea618d10df5440c1c (diff) |
* drop AVAHI_RESOLVER_TIMEOUT, AVAHI_RESOLVER_NOT_FOUND and AVAHI_BROWSER_NOT_FOUND, use AVAHI_xxx_FAILURE instead
* set the client/server errno variable when AVAHI_xxx_FAILURE happens
* update DBUS interface accordingly, pass errno value with Failure events
* Pass DNS return codes to the app by wrapping them in avahi error codes
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@732 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'examples/client-browse-services.c')
-rw-r--r-- | examples/client-browse-services.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/client-browse-services.c b/examples/client-browse-services.c index ac65ac4..7a6940b 100644 --- a/examples/client-browse-services.c +++ b/examples/client-browse-services.c @@ -55,11 +55,8 @@ static void resolve_callback( /* Called whenever a service has been resolved successfully or timed out */ switch (event) { - case AVAHI_RESOLVER_TIMEOUT: - case AVAHI_RESOLVER_NOT_FOUND: case AVAHI_RESOLVER_FAILURE: - fprintf(stderr, "(Resolver) Failed to resolve service '%s' of type '%s' in domain '%s': %s\n", name, type, domain, - event == AVAHI_RESOLVER_TIMEOUT ? "TIMEOUT" : (event == AVAHI_RESOLVER_NOT_FOUND ? "NOT_FOUND" : "FAILURE")); + fprintf(stderr, "(Resolver) Failed to resolve service '%s' of type '%s' in domain '%s': %s\n", name, type, domain, avahi_strerror(avahi_client_errno(avahi_service_resolver_get_client(r)))); break; case AVAHI_RESOLVER_FOUND: { @@ -110,9 +107,8 @@ static void browse_callback( switch (event) { case AVAHI_BROWSER_FAILURE: - case AVAHI_BROWSER_NOT_FOUND: - fprintf(stderr, "(Browser) %s\n", event == AVAHI_BROWSER_FAILURE ? "FAILURE" : "NOT_FOUND"); + fprintf(stderr, "(Browser) %s\n", avahi_strerror(avahi_client_errno(avahi_service_browser_get_client(b)))); avahi_simple_poll_quit(simple_poll); return; |