summaryrefslogtreecommitdiffstats
path: root/avahi-compat-libdns_sd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-10 22:34:06 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-10 22:34:06 +0000
commitd1dd07145bb3db5c6fd77c55aea762eb79ab3b5c (patch)
treef50a23c8d0faad85af129a2bac6fb3c08724cdab /avahi-compat-libdns_sd
parent1c22aa6ce3490c7f5447179b4ec2e6113881660e (diff)
* rename avahi_service_name_snprint() to avahi_service_name_join()
* add avahi_service_name_split() and make everything use it * change avahi_normalize_name() to work on a supplied buffer instead of malloc'ed memory. * add avahi_normalize_name_strdup() that retains the old behaviour avahi_normalize_name() * same thing for avahi_get_host_name()/avahi_get_host_name_strdup() * Rewrite domain name escaping and validity checking code * Remove superfluous memory allocationsfrom various browsers and do some other major cleanups * add new global macro AVAHI_CHECK_VALIDITY_RETURN_NULL() and modify many things to make use of it * add AVAHI_LABEL_MAX * patch everything to make use of AVAHI_LABEL_MAX and AVAHI_DOMAIN_NAME_MAX * add pretty printing for NS records * add partial pretty printing for SOA records * add many more validity checks to various user API functions git-svn-id: file:///home/lennart/svn/public/avahi/trunk@708 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-compat-libdns_sd')
-rw-r--r--avahi-compat-libdns_sd/compat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/avahi-compat-libdns_sd/compat.c b/avahi-compat-libdns_sd/compat.c
index adca034..9bb2ce8 100644
--- a/avahi-compat-libdns_sd/compat.c
+++ b/avahi-compat-libdns_sd/compat.c
@@ -582,7 +582,7 @@ static void service_resolver_callback(
if ((p = avahi_new0(char, (l = avahi_string_list_serialize(txt, NULL, 0))+1)))
avahi_string_list_serialize(txt, p, l);
- ret = avahi_service_name_snprint(full_name, sizeof(full_name), name, type, domain);
+ ret = avahi_service_name_join(full_name, sizeof(full_name), name, type, domain);
assert(ret == AVAHI_OK);
strcat(full_name, ".");
@@ -678,7 +678,7 @@ int DNSSD_API DNSServiceConstructFullName (
assert(regtype);
assert(domain);
- if (avahi_service_name_snprint(fullName, kDNSServiceMaxDomainName, service, regtype, domain) < 0)
+ if (avahi_service_name_join(fullName, kDNSServiceMaxDomainName, service, regtype, domain) < 0)
return -1;
return 0;
@@ -970,9 +970,9 @@ DNSServiceErrorType DNSSD_API DNSServiceRegister (
sdref->service_register_callback = callback;
sdref->service_name = avahi_strdup(name);
- sdref->service_regtype = regtype ? avahi_normalize_name(regtype) : NULL;
- sdref->service_domain = domain ? avahi_normalize_name(domain) : NULL;
- sdref->service_host = host ? avahi_normalize_name(host) : NULL;
+ sdref->service_regtype = regtype ? avahi_normalize_name_strdup(regtype) : NULL;
+ sdref->service_domain = domain ? avahi_normalize_name_strdup(domain) : NULL;
+ sdref->service_host = host ? avahi_normalize_name_strdup(host) : NULL;
sdref->service_interface = interface == kDNSServiceInterfaceIndexAny ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface;
sdref->service_port = ntohs(port);
sdref->service_txt = txtRecord ? avahi_string_list_parse(txtRecord, txtLen) : NULL;