summaryrefslogtreecommitdiff
path: root/lib/dns/name.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/name.c')
-rw-r--r--lib/dns/name.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/dns/name.c b/lib/dns/name.c
index a15c7d23..638cdc86 100644
--- a/lib/dns/name.c
+++ b/lib/dns/name.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.c,v 1.163 2007/06/19 23:47:16 tbox Exp $ */
+/* $Id: name.c,v 1.163.128.2 2008/03/31 23:46:42 tbox Exp $ */
/*! \file */
@@ -155,7 +155,7 @@ do { \
static unsigned char root_ndata[] = { '\0' };
static unsigned char root_offsets[] = { 0 };
-static dns_name_t root =
+static dns_name_t root =
{
DNS_NAME_MAGIC,
root_ndata, 1, 1,
@@ -298,7 +298,7 @@ dns_name_ismailbox(const dns_name_t *name) {
REQUIRE(name->labels > 0);
REQUIRE(name->attributes & DNS_NAMEATTR_ABSOLUTE);
- /*
+ /*
* Root label.
*/
if (name->length == 1)
@@ -312,7 +312,7 @@ dns_name_ismailbox(const dns_name_t *name) {
if (!domainchar(ch))
return (ISC_FALSE);
}
-
+
if (ndata == name->ndata + name->length)
return (ISC_FALSE);
@@ -347,8 +347,8 @@ dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard) {
REQUIRE(VALID_NAME(name));
REQUIRE(name->labels > 0);
REQUIRE(name->attributes & DNS_NAMEATTR_ABSOLUTE);
-
- /*
+
+ /*
* Root label.
*/
if (name->length == 1)
@@ -918,7 +918,7 @@ dns_name_getlabelsequence(const dns_name_t *source,
target->ndata = &source->ndata[firstoffset];
target->length = endoffset - firstoffset;
-
+
if (first + n == source->labels && n > 0 &&
(source->attributes & DNS_NAMEATTR_ABSOLUTE) != 0)
target->attributes |= DNS_NAMEATTR_ABSOLUTE;
@@ -991,7 +991,7 @@ dns_name_fromregion(dns_name_t *name, const isc_region_t *r) {
name->length = len;
} else {
name->ndata = r->base;
- name->length = (r->length <= DNS_NAME_MAXWIRE) ?
+ name->length = (r->length <= DNS_NAME_MAXWIRE) ?
r->length : DNS_NAME_MAXWIRE;
}
@@ -1049,7 +1049,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
REQUIRE(ISC_BUFFER_VALID(source));
REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
(target == NULL && ISC_BUFFER_VALID(name->buffer)));
-
+
downcase = ISC_TF((options & DNS_NAME_DOWNCASE) != 0);
if (target == NULL && name->buffer != NULL) {
@@ -1303,8 +1303,9 @@ totext_filter_proc_key_init(void) {
result = isc_mem_create2(0, 0, &thread_key_mctx, 0);
if (result != ISC_R_SUCCESS)
goto unlock;
+ isc_mem_setname(thread_key_mctx, "threadkey", NULL);
isc_mem_setdestroycheck(thread_key_mctx, ISC_FALSE);
-
+
if (!thread_key_initialized &&
isc_thread_key_create(&totext_filter_proc_key,
free_specific) != 0) {
@@ -2299,7 +2300,7 @@ dns_name_settotextfilter(dns_name_totextfilter_t proc) {
result = ISC_R_UNEXPECTED;
return (result);
}
-
+
mem = isc_mem_get(thread_key_mctx, sizeof(*mem));
if (mem == NULL)
return (ISC_R_NOMEMORY);