diff options
author | Martin Hedenfal <martinh@cvs.openbsd.org> | 2010-06-11 08:45:07 +0000 |
---|---|---|
committer | Martin Hedenfal <martinh@cvs.openbsd.org> | 2010-06-11 08:45:07 +0000 |
commit | 2be45a5d17335c02bc84b56cefd4a85f0e0da8ce (patch) | |
tree | 3c515122502cd922ea591b4e7d2ba2cba5ed906b | |
parent | 54bad3bc58caa6ca1c950277876afedfeff6b86a (diff) |
Track changes in btree_txn_* API, pass a NULL btree when also passing a
transaction.
-rw-r--r-- | usr.sbin/ldapd/index.c | 11 | ||||
-rw-r--r-- | usr.sbin/ldapd/namespace.c | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/ldapd/index.c b/usr.sbin/ldapd/index.c index 11fd2f53135..743afa11be7 100644 --- a/usr.sbin/ldapd/index.c +++ b/usr.sbin/ldapd/index.c @@ -1,4 +1,4 @@ -/* $OpenBSD: index.c,v 1.3 2010/06/03 17:32:25 martinh Exp $ */ +/* $OpenBSD: index.c,v 1.4 2010/06/11 08:45:06 martinh Exp $ */ /* * Copyright (c) 2009 Martin Hedenfalk <martin@bzero.se> @@ -111,7 +111,8 @@ index_attribute(struct namespace *ns, char *attr, struct btval *dn, (char *)dn->data); key.data = t; normalize_dn(key.data); - rc = btree_txn_put(ns->indx_db, ns->indx_txn, &key, &val, BT_NOOVERWRITE); + rc = btree_txn_put(NULL, ns->indx_txn, &key, &val, + BT_NOOVERWRITE); free(t); if (rc == BT_FAIL) return -1; @@ -152,7 +153,7 @@ index_rdn(struct namespace *ns, struct btval *dn) key.data = t; log_debug("indexing rdn on %.*s", (int)key.size, (char *)key.data); normalize_dn(key.data); - rc = btree_txn_put(ns->indx_db, ns->indx_txn, &key, &val, BT_NOOVERWRITE); + rc = btree_txn_put(NULL, ns->indx_txn, &key, &val, BT_NOOVERWRITE); free(t); if (rc == BT_FAIL) return -1; @@ -188,7 +189,7 @@ unindex_attribute(struct namespace *ns, char *attr, struct btval *dn, (char *)dn->data); key.data = t; normalize_dn(key.data); - rc = btree_txn_del(ns->indx_db, ns->indx_txn, &key, NULL); + rc = btree_txn_del(NULL, ns->indx_txn, &key, NULL); free(t); if (rc == BT_FAIL) return -1; @@ -240,7 +241,7 @@ unindex_rdn(struct namespace *ns, struct btval *dn) key.data = t; log_debug("unindexing rdn on %.*s", (int)key.size, (char *)key.data); normalize_dn(key.data); - rc = btree_txn_del(ns->indx_db, ns->indx_txn, &key, NULL); + rc = btree_txn_del(NULL, ns->indx_txn, &key, NULL); free(t); if (rc == BT_FAIL) return -1; diff --git a/usr.sbin/ldapd/namespace.c b/usr.sbin/ldapd/namespace.c index 28e1e0364d5..1cf20acb41e 100644 --- a/usr.sbin/ldapd/namespace.c +++ b/usr.sbin/ldapd/namespace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: namespace.c,v 1.3 2010/06/03 17:29:54 martinh Exp $ */ +/* $OpenBSD: namespace.c,v 1.4 2010/06/11 08:45:06 martinh Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se> @@ -389,7 +389,7 @@ namespace_put(struct namespace *ns, char *dn, struct ber_element *root, if (namespace_begin(ns) != 0) return BT_FAIL; - rc = btree_txn_put(ns->data_db, ns->data_txn, &key, &val, + rc = btree_txn_put(NULL, ns->data_txn, &key, &val, update ? 0 : BT_NOOVERWRITE); if (rc != BT_SUCCESS) { if (rc == BT_EXISTS) @@ -452,7 +452,7 @@ namespace_del(struct namespace *ns, char *dn) if (namespace_begin(ns) != 0) return BT_FAIL; - rc = btree_txn_del(ns->data_db, ns->data_txn, &key, &data); + rc = btree_txn_del(NULL, ns->data_txn, &key, &data); if (rc != BT_SUCCESS) goto fail; |