summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-08-19 10:53:29 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:56 +0200
commit25a9978c2c4d00eb64b212170f64f5cc136e032a (patch)
treea65854451cbf9a14b92ef79d85a44a2adaddb9eb /source3/lib/dbwrap
parent46370441b7bc9a205b13b07ab93b97f44bf34b78 (diff)
downloadsamba-25a9978c2c4d00eb64b212170f64f5cc136e032a.tar.gz
samba-25a9978c2c4d00eb64b212170f64f5cc136e032a.tar.bz2
samba-25a9978c2c4d00eb64b212170f64f5cc136e032a.zip
s3:dbwrap: add dbwrap_fetch_locked(), a wrapper for db->fetch_locked
Diffstat (limited to 'source3/lib/dbwrap')
-rw-r--r--source3/lib/dbwrap/dbwrap.c7
-rw-r--r--source3/lib/dbwrap/dbwrap.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c
index af3cbb1ff9..d5e9689895 100644
--- a/source3/lib/dbwrap/dbwrap.c
+++ b/source3/lib/dbwrap/dbwrap.c
@@ -123,6 +123,13 @@ NTSTATUS dbwrap_record_delete(struct db_record *rec)
return rec->delete_rec(rec);
}
+struct db_record *dbwrap_fetch_locked(struct db_context *db,
+ TALLOC_CTX *mem_ctx,
+ TDB_DATA key)
+{
+ return db->fetch_locked(db, mem_ctx, key);
+}
+
TDB_DATA dbwrap_fetch(struct db_context *db, TALLOC_CTX *mem_ctx,
TDB_DATA key)
{
diff --git a/source3/lib/dbwrap/dbwrap.h b/source3/lib/dbwrap/dbwrap.h
index 7c19371cdb..145fabd536 100644
--- a/source3/lib/dbwrap/dbwrap.h
+++ b/source3/lib/dbwrap/dbwrap.h
@@ -65,6 +65,9 @@ TDB_DATA dbwrap_record_get_value(const struct db_record *rec);
void *dbwrap_record_get_private_data(const struct db_record *rec);
NTSTATUS dbwrap_record_store(struct db_record *rec, TDB_DATA data, int flags);
NTSTATUS dbwrap_record_delete(struct db_record *rec);
+struct db_record *dbwrap_fetch_locked(struct db_context *db,
+ TALLOC_CTX *mem_ctx,
+ TDB_DATA key);
NTSTATUS dbwrap_delete(struct db_context *db, TDB_DATA key);
NTSTATUS dbwrap_store(struct db_context *db, TDB_DATA key,