]> arthur.barton.de Git - netatalk.git/commitdiff
Change didname database to a hash instead of btree. Since we're using a
authorjmarcus <jmarcus>
Mon, 21 Jan 2002 04:48:14 +0000 (04:48 +0000)
committerjmarcus <jmarcus>
Mon, 21 Jan 2002 04:48:14 +0000 (04:48 +0000)
red-black tree within afpd to keep directories in line, this is sort of
redundant.  Also, the compare function seems to be buggy.

This is still a todo item, but as of now, the hash seems to work well, and
increase database resiliency.  This commit obsoletes the didname verify
tool in bin.  I'm going to leave the tool in for now pending further
investigation of this problem.

libatalk/cnid/cnid_open.c

index e661659cba77e403d2520cebd85b662e543399b7..7b7d065c6bf6c1aece299d3ab45c2bf6f49396bc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_open.c,v 1.33 2002-01-18 05:23:25 jmarcus Exp $
+ * $Id: cnid_open.c,v 1.34 2002-01-21 04:48:14 jmarcus Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -368,9 +368,9 @@ void *cnid_open(const char *dir) {
         goto fail_appinit;
     }
 
-    db->db_didname->set_bt_compare(db->db_didname, &compare_unix);
+    /*db->db_didname->set_bt_compare(db->db_didname, &compare_unix);*/
     if ((rc = db->db_didname->open(db->db_didname, DBDIDNAME, NULL,
-                                   DB_BTREE, open_flag, 0666))) {
+                                   DB_HASH, open_flag, 0666))) {
         LOG(log_error, logtype_default, "cnid_open: Failed to open did/name database: %s",
             db_strerror(rc));
         goto fail_appinit;