summaryrefslogtreecommitdiffstats
path: root/avahi-compat-libdns_sd/compat.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-21 16:43:44 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-21 16:43:44 +0000
commitd4fd0d73b1d646f3708f1fdcbca0d494dda7e475 (patch)
treeeb9662abbb2953bfc94a79a131cb16608b4146d7 /avahi-compat-libdns_sd/compat.c
parentd1d20bb7d1a2ea19e1f62db47ec73baf8300efb8 (diff)
allow passing NULL as callback function in DNSServiceRegister() as documented by Apple. (closes #57)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1248 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-compat-libdns_sd/compat.c')
-rw-r--r--avahi-compat-libdns_sd/compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/avahi-compat-libdns_sd/compat.c b/avahi-compat-libdns_sd/compat.c
index effa0e7..b4f2fc6 100644
--- a/avahi-compat-libdns_sd/compat.c
+++ b/avahi-compat-libdns_sd/compat.c
@@ -790,7 +790,8 @@ static void reg_report_error(DNSServiceRef sdref, DNSServiceErrorType error) {
assert(sdref);
assert(sdref->n_ref >= 1);
- assert(sdref->service_register_callback);
+ if (!sdref->service_register_callback)
+ return;
regtype = add_trailing_dot(sdref->service_regtype, regtype_fixed, sizeof(regtype_fixed));
domain = add_trailing_dot(sdref->service_domain, domain_fixed, sizeof(domain_fixed));
@@ -983,7 +984,6 @@ DNSServiceErrorType DNSSD_API DNSServiceRegister (
AVAHI_WARN_LINKAGE;
assert(ret_sdref);
- assert(callback);
assert(regtype);
if (interface == kDNSServiceInterfaceIndexLocalOnly || flags) {