]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1708. [cleanup] Replaced dns_fullname_hash() with dns_name_fullhash()
authorMark Andrews <marka@isc.org>
Wed, 1 Sep 2004 05:19:59 +0000 (05:19 +0000)
committerMark Andrews <marka@isc.org>
Wed, 1 Sep 2004 05:19:59 +0000 (05:19 +0000)
                        for conformance to the name space convention.  Binary
                        backward compatibility to the old function name is
                        provided. [RT #12376]

CHANGES
lib/dns/adb.c
lib/dns/include/dns/name.h
lib/dns/name.c

diff --git a/CHANGES b/CHANGES
index 22db3e8c74fdc6971cb9769cf1547a8b4aa9f217..99b2bbff1113625eaa28232b1555145db3f02e09 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1708.  [cleanup]       Replaced dns_fullname_hash() with dns_name_fullhash()
+                       for conformance to the name space convention.  Binary
+                       backward compatibility to the old function name is
+                       provided. [RT #12376]
 
        --- 9.3.0 released ---
 
index ca841715d225d192ebed34f8cf2f92665255d8a8..43b66692a287c01dde081f9015413c6b61d9ffbc 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: adb.c,v 1.181.2.11.2.18 2004/06/18 01:22:39 marka Exp $ */
+/* $Id: adb.c,v 1.181.2.11.2.19 2004/09/01 05:19:57 marka Exp $ */
 
 /*
  * Implementation notes
@@ -1581,7 +1581,7 @@ find_name_and_lock(dns_adb_t *adb, dns_name_t *name,
        dns_adbname_t *adbname;
        int bucket;
 
-       bucket = dns_fullname_hash(name, ISC_FALSE) % NBUCKETS;
+       bucket = dns_name_fullhash(name, ISC_FALSE) % NBUCKETS;
 
        if (*bucketp == DNS_ADB_INVALIDBUCKET) {
                LOCK(&adb->namelocks[bucket]);
index 4a9eb23ec0f0710621e997e25b421194edf4ff37..dd6a1239d74505bc798cf88c6d1c83bac7f263ce 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: name.h,v 1.95.2.3.2.10 2004/08/10 00:41:39 marka Exp $ */
+/* $Id: name.h,v 1.95.2.3.2.11 2004/09/01 05:19:59 marka Exp $ */
 
 #ifndef DNS_NAME_H
 #define DNS_NAME_H 1
@@ -312,7 +312,7 @@ dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive);
  */
 
 unsigned int
-dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive);
+dns_name_fullhash(dns_name_t *name, isc_boolean_t case_sensitive);
 /*
  * Provide a hash value for 'name'.  Unlike dns_name_hash(), this function
  * always takes into account of the entire name to calculate the hash value.
index 8962ebc0041f92ca5eae096d2c51b7f361e13dc0..37a5f4e81268cf41240278c8316e177fad7e4e8a 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: name.c,v 1.127.2.7.2.10 2004/04/19 21:55:38 marka Exp $ */
+/* $Id: name.c,v 1.127.2.7.2.11 2004/09/01 05:19:59 marka Exp $ */
 
 #include <config.h>
 
@@ -179,6 +179,9 @@ static dns_name_t wild =
 /* XXXDCL make const? */
 LIBDNS_EXTERNAL_DATA dns_name_t *dns_wildcardname = &wild;
 
+unsigned int
+dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive);
+
 static void
 set_offsets(const dns_name_t *name, unsigned char *offsets,
            dns_name_t *set_name);
@@ -430,7 +433,7 @@ dns_name_hash(dns_name_t *name, isc_boolean_t case_sensitive) {
 }
 
 unsigned int
-dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive) {
+dns_name_fullhash(dns_name_t *name, isc_boolean_t case_sensitive) {
        /*
         * Provide a hash value for 'name'.
         */
@@ -443,6 +446,18 @@ dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive) {
                              name->length, case_sensitive));
 }
 
+unsigned int
+dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive) {
+       /*
+        * This function was deprecated due to the breakage of the name space
+        * convention.  We only keep this internally to provide binary backward
+        * compatibility.
+        */
+       REQUIRE(VALID_NAME(name));
+
+       return (dns_name_fullhash(name, case_sensitive));
+}
+
 unsigned int
 dns_name_hashbylabel(dns_name_t *name, isc_boolean_t case_sensitive) {
        unsigned char *offsets;