From bb14e0a8aa3173c8a6d80b1a9c8b300a452ee9f1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 12 Oct 2005 02:37:08 +0000 Subject: * 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 --- avahi-core/browse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'avahi-core/browse.c') diff --git a/avahi-core/browse.c b/avahi-core/browse.c index 5617395..a133c62 100644 --- a/avahi-core/browse.c +++ b/avahi-core/browse.c @@ -222,7 +222,6 @@ static void lookup_wide_area_callback( abort(); case AVAHI_BROWSER_ALL_FOR_NOW: - case AVAHI_BROWSER_NOT_FOUND: case AVAHI_BROWSER_FAILURE: b->callback(b, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, event, NULL, flags, b->userdata); @@ -292,7 +291,6 @@ static void lookup_multicast_callback( break; case AVAHI_BROWSER_CACHE_EXHAUSTED: - case AVAHI_BROWSER_NOT_FOUND: case AVAHI_BROWSER_FAILURE: /* Not defined for multicast DNS */ abort(); @@ -464,6 +462,8 @@ static void defer_callback(AvahiTimeEvent *e, void *userdata) { if (n < 0) { /* sending of the initial query failed */ + avahi_server_set_errno(b->server, AVAHI_ERR_FAILURE); + b->callback( b, b->interface, b->protocol, AVAHI_BROWSER_FAILURE, NULL, b->flags & AVAHI_LOOKUP_USE_WIDE_AREA ? AVAHI_LOOKUP_RESULT_WIDE_AREA : AVAHI_LOOKUP_RESULT_MULTICAST, -- cgit