summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2011-07-04 10:22:46 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:55 +0200
commitfff09d066f5b5ba82e268f4251802fd7f3006a5e (patch)
treeed31686bc0ab11abd81234df6901d6e545934370
parent28e4c41d5b69b126d17b2d9cc7452c051f083878 (diff)
downloadsamba-fff09d066f5b5ba82e268f4251802fd7f3006a5e.tar.gz
samba-fff09d066f5b5ba82e268f4251802fd7f3006a5e.tar.bz2
samba-fff09d066f5b5ba82e268f4251802fd7f3006a5e.zip
s3:dbwrap: add specific dbwrap_exists() implementation to dbwrap_rbt
-rw-r--r--source3/lib/dbwrap/dbwrap_rbt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap_rbt.c b/source3/lib/dbwrap/dbwrap_rbt.c
index db5b8e866d..54d3fa3aae 100644
--- a/source3/lib/dbwrap/dbwrap_rbt.c
+++ b/source3/lib/dbwrap/dbwrap_rbt.c
@@ -311,6 +311,11 @@ static struct db_record *db_rbt_fetch_locked(struct db_context *db_ctx,
return result;
}
+static int db_rbt_exists(struct db_context *db, TDB_DATA key)
+{
+ return db_rbt_search_internal(db, key, NULL);
+}
+
static int db_rbt_fetch(struct db_context *db, TALLOC_CTX *mem_ctx,
TDB_DATA key, TDB_DATA *data)
{
@@ -413,6 +418,7 @@ struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
result->transaction_start = db_rbt_trans_dummy;
result->transaction_commit = db_rbt_trans_dummy;
result->transaction_cancel = db_rbt_trans_dummy;
+ result->exists = db_rbt_exists;
return result;
}