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 /avahi-compat-libdns_sd/compat.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 'avahi-compat-libdns_sd/compat.c')
-rw-r--r-- | avahi-compat-libdns_sd/compat.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/avahi-compat-libdns_sd/compat.c b/avahi-compat-libdns_sd/compat.c index 02c04ee..fda5b59 100644 --- a/avahi-compat-libdns_sd/compat.c +++ b/avahi-compat-libdns_sd/compat.c @@ -448,11 +448,7 @@ static void service_browser_callback( break; case AVAHI_BROWSER_FAILURE: - sdref->service_browser_callback(sdref, 0, interface, kDNSServiceErr_Unknown, NULL, NULL, NULL, sdref->context); - break; - - case AVAHI_BROWSER_NOT_FOUND: - sdref->service_browser_callback(sdref, 0, interface, kDNSServiceErr_NoSuchName, NULL, NULL, NULL, sdref->context); + sdref->service_browser_callback(sdref, 0, interface, map_error(avahi_client_errno(sdref->client)), NULL, NULL, NULL, sdref->context); break; case AVAHI_BROWSER_CACHE_EXHAUSTED: @@ -594,13 +590,8 @@ static void service_resolver_callback( break; } - case AVAHI_RESOLVER_TIMEOUT: - case AVAHI_RESOLVER_NOT_FOUND: - sdref->service_resolver_callback(sdref, 0, interface, kDNSServiceErr_NoSuchName, NULL, NULL, 0, 0, NULL, sdref->context); - break; - case AVAHI_RESOLVER_FAILURE: - sdref->service_resolver_callback(sdref, 0, interface, kDNSServiceErr_Unknown, NULL, NULL, 0, 0, NULL, sdref->context); + sdref->service_resolver_callback(sdref, 0, interface, map_error(avahi_client_errno(sdref->client)), NULL, NULL, 0, 0, NULL, sdref->context); } } @@ -713,11 +704,7 @@ static void domain_browser_callback( break; case AVAHI_BROWSER_FAILURE: - sdref->domain_browser_callback(sdref, 0, interface, kDNSServiceErr_Unknown, domain, sdref->context); - break; - - case AVAHI_BROWSER_NOT_FOUND: - sdref->domain_browser_callback(sdref, 0, interface, kDNSServiceErr_NoSuchName, domain, sdref->context); + sdref->domain_browser_callback(sdref, 0, interface, map_error(avahi_client_errno(sdref->client)), domain, sdref->context); break; case AVAHI_BROWSER_CACHE_EXHAUSTED: |