From: Lennart Poettering Date: Thu, 6 Oct 2005 14:08:26 +0000 (+0000) Subject: add more AVAHI_WARN_UNSUPPORTED lines X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=1c22aa6ce3490c7f5447179b4ec2e6113881660e;p=catta add more AVAHI_WARN_UNSUPPORTED lines git-svn-id: file:///home/lennart/svn/public/avahi/trunk@703 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-compat-libdns_sd/compat.c b/avahi-compat-libdns_sd/compat.c index a99e0f6..adca034 100644 --- a/avahi-compat-libdns_sd/compat.c +++ b/avahi-compat-libdns_sd/compat.c @@ -509,8 +509,10 @@ DNSServiceErrorType DNSSD_API DNSServiceBrowse( assert(domain); assert(callback); - if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) + if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) { + AVAHI_WARN_UNSUPPORTED; return kDNSServiceErr_Unsupported; + } if (!(sdref = sdref_new())) return kDNSServiceErr_Unknown; @@ -625,8 +627,10 @@ DNSServiceErrorType DNSSD_API DNSServiceResolve( assert(domain); assert(callback); - if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) + if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) { + AVAHI_WARN_UNSUPPORTED; return kDNSServiceErr_Unsupported; + } if (!(sdref = sdref_new())) return kDNSServiceErr_Unknown; @@ -739,8 +743,10 @@ DNSServiceErrorType DNSSD_API DNSServiceEnumerateDomains( assert(callback); if (interface == kDNSServiceInterfaceIndexLocalOnly || - (flags != kDNSServiceFlagsBrowseDomains && flags != kDNSServiceFlagsRegistrationDomains)) + (flags != kDNSServiceFlagsBrowseDomains && flags != kDNSServiceFlagsRegistrationDomains)) { + AVAHI_WARN_UNSUPPORTED; return kDNSServiceErr_Unsupported; + } if (!(sdref = sdref_new())) return kDNSServiceErr_Unknown; @@ -952,8 +958,10 @@ DNSServiceErrorType DNSSD_API DNSServiceRegister ( assert(callback); assert(regtype); - if (interface == kDNSServiceInterfaceIndexLocalOnly || flags) + if (interface == kDNSServiceInterfaceIndexLocalOnly || flags) { + AVAHI_WARN_UNSUPPORTED; return kDNSServiceErr_Unsupported; + } if (!(sdref = sdref_new())) return kDNSServiceErr_Unknown; diff --git a/avahi-compat-libdns_sd/warn.c b/avahi-compat-libdns_sd/warn.c index 859cfb0..7ebc7b1 100644 --- a/avahi-compat-libdns_sd/warn.c +++ b/avahi-compat-libdns_sd/warn.c @@ -78,7 +78,7 @@ void avahi_warn_unsupported(const char *function) { char exename[256]; get_exe_name(exename, sizeof(exename)); - fprintf(stderr, "*** WARNING: The application '%s' called '%s()' which is not supported in the Bonjour compatiblity layer of Avahi. Please fix it to use the native API! ***\n", exename, function); + fprintf(stderr, "*** WARNING: The application '%s' called '%s()' which is not supported (or only supported partially) in the Bonjour compatiblity layer of Avahi. Please fix it to use the native API! ***\n", exename, function); }