81 lines
2.1 KiB
Diff
81 lines
2.1 KiB
Diff
diff -ur /usr/src/packages/BUILD/avahi-0.6.17/avahi-compat-libdns_sd/compat.c ../avahi-compat-libdns_sd/compat.c
|
|
--- avahi-compat-libdns_sd/compat.c 2007-01-06 13:29:05.000000000 -0500
|
|
+++ avahi-compat-libdns_sd/compat.c 2007-03-07 16:32:59.000000000 -0500
|
|
@@ -612,12 +612,10 @@
|
|
|
|
AVAHI_WARN_LINKAGE;
|
|
|
|
- if (!ret_sdref)
|
|
+ if (!ret_sdref || !regtype)
|
|
return kDNSServiceErr_BadParam;
|
|
*ret_sdref = NULL;
|
|
|
|
- assert(regtype);
|
|
-
|
|
if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) {
|
|
AVAHI_WARN_UNSUPPORTED;
|
|
return kDNSServiceErr_Unsupported;
|
|
@@ -739,15 +737,10 @@
|
|
|
|
AVAHI_WARN_LINKAGE;
|
|
|
|
- if (!ret_sdref)
|
|
+ if (!ret_sdref || !name || !regtype || !domain || !callback)
|
|
return kDNSServiceErr_BadParam;
|
|
*ret_sdref = NULL;
|
|
|
|
- assert(name);
|
|
- assert(regtype);
|
|
- assert(domain);
|
|
- assert(callback);
|
|
-
|
|
if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) {
|
|
AVAHI_WARN_UNSUPPORTED;
|
|
return kDNSServiceErr_Unsupported;
|
|
@@ -795,9 +788,8 @@
|
|
|
|
AVAHI_WARN_LINKAGE;
|
|
|
|
- assert(fullName);
|
|
- assert(regtype);
|
|
- assert(domain);
|
|
+ if (!fullName || !regtype || !domain)
|
|
+ return -1;
|
|
|
|
if (avahi_service_name_join(fullName, kDNSServiceMaxDomainName, service, regtype, domain) < 0)
|
|
return -1;
|
|
@@ -856,12 +848,10 @@
|
|
|
|
AVAHI_WARN_LINKAGE;
|
|
|
|
- if (!ret_sdref)
|
|
+ if (!ret_sdref || !callback)
|
|
return kDNSServiceErr_BadParam;
|
|
*ret_sdref = NULL;
|
|
|
|
- assert(callback);
|
|
-
|
|
if (interface == kDNSServiceInterfaceIndexLocalOnly ||
|
|
(flags != kDNSServiceFlagsBrowseDomains && flags != kDNSServiceFlagsRegistrationDomains)) {
|
|
AVAHI_WARN_UNSUPPORTED;
|
|
@@ -1100,14 +1090,14 @@
|
|
|
|
AVAHI_WARN_LINKAGE;
|
|
|
|
- if (!ret_sdref)
|
|
+ if (!ret_sdref || !regtype)
|
|
return kDNSServiceErr_BadParam;
|
|
*ret_sdref = NULL;
|
|
|
|
- if (!regtype)
|
|
- return kDNSServiceErr_BadParam;
|
|
-
|
|
- assert(txtRecord || txtLen == 0);
|
|
+ if (!txtRecord) {
|
|
+ txtLen = 1;
|
|
+ txtRecord = "";
|
|
+ }
|
|
|
|
if (interface == kDNSServiceInterfaceIndexLocalOnly || flags) {
|
|
AVAHI_WARN_UNSUPPORTED;
|