]> arthur.barton.de Git - netatalk.git/commitdiff
Add support for internal deadlock detection.
authorjmarcus <jmarcus>
Thu, 27 Sep 2001 15:51:26 +0000 (15:51 +0000)
committerjmarcus <jmarcus>
Thu, 27 Sep 2001 15:51:26 +0000 (15:51 +0000)
ChangeLog
libatalk/cnid/cnid_open.c

index 36fa1a9baa160d75b9e21d070c5577995825637f..03e7d48411f53d1861c3742e34acd7e7915bdd0c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
 
+2001-09-27  joe c   <marcus@marcuscom.com>
+
+       * libatalk/cnid/cnid_open.c: Set internal deadlock detection
+
 2001-09-23  joe c   <marcus@marcuscom.com>
 
        * libatalk/cnid/cnid_close.c, libatalk/cnid/cnid_resolve.c,
index b3a4315ffe030902622fce1a35e8d04ec1f35f4f..bcbd8786ae044d3a0473c44ecb564508c18ddc20 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_open.c,v 1.12 2001-09-23 19:08:23 jmarcus Exp $
+ * $Id: cnid_open.c,v 1.13 2001-09-27 15:51:27 jmarcus Exp $
  *
  * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -237,8 +237,18 @@ mkdir_appledb:
     goto fail_lock;
   }
 
+  /* Setup internal deadlock detection. */
+  if ((rc = db->dbenv->set_lk_detect(db->dbenv, DB_LOCK_DEFAULT)) != 0) {
+    syslog(LOG_ERR, "cnid_open: set_lk_detect failed (%d)", rc);
+    goto fail_lock;
+  }
+
 #if DB_VERSION_MINOR > 1
-  db->dbenv->set_flags(db->dbenv, DB_TXN_NOSYNC, 1);
+  /* Take care of setting the NOSYNC flag in db3 > 3.1.x. */
+  if ((rc = db->dbenv->set_flags(db->dbenv, DB_TXN_NOSYNC, 1)) != 0 ) {
+         syslog(LOG_ERR, "cnid_open: set_flags failed (%d)", rc);
+         goto fail_lock;
+  }
 #endif /* DB_VERSION_MINOR > 1 */
 
   /* Check to see if a DBENV already exists.  If it does, join it. */