]> 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:13:06 +0000 (05:13 +0000)
committerMark Andrews <marka@isc.org>
Wed, 1 Sep 2004 05:13:06 +0000 (05:13 +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 21d71395e1eeeec3eaac972f9331237fb1248be7..1d401b18737bea6ca2cbcff07b5c03a346390530 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
 1709.  [placeholder]   rt12404
 
-1708.  [placeholder]   rt12376
+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]
 
 1707.  [contrib]       sdb/ldap updated to version 1.0-beta.
 
index 8ae10e0350bbb3555af0581261691deb56f5848b..8e41c96af945dcc470f36fe37f023ca08dfaa4d1 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: adb.c,v 1.216 2004/06/18 01:22:32 marka Exp $ */
+/* $Id: adb.c,v 1.217 2004/09/01 05:13:04 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 111dde573a85bfa8dcdab3b02f1e7aca66961a40..6f976ce7f4a0f5fc073bfd942f09c00c4df19d75 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: name.h,v 1.109 2004/08/10 00:35:01 marka Exp $ */
+/* $Id: name.h,v 1.110 2004/09/01 05:13:06 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 9e76f6c3b05ab6163a59c7df5fc322887d972659..27110a93ed37005b9b8eb8d84f28dd256b70aded 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: name.c,v 1.145 2004/04/19 21:47:43 marka Exp $ */
+/* $Id: name.c,v 1.146 2004/09/01 05:13:05 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;