diff options
author | Michael Adam <obnox@samba.org> | 2011-08-17 08:36:52 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:55 +0200 |
commit | 2aa5601c0aa1c38e2cb3b86331b746261e74b2ce (patch) | |
tree | e0cc2eec3394cc79097dd8be4a6c8e6ad0faf6b7 /source3/lib/dbwrap | |
parent | c3868b74889ccce800557a64d2a5ae6a8891a8ee (diff) | |
download | samba-2aa5601c0aa1c38e2cb3b86331b746261e74b2ce.tar.gz samba-2aa5601c0aa1c38e2cb3b86331b746261e74b2ce.tar.bz2 samba-2aa5601c0aa1c38e2cb3b86331b746261e74b2ce.zip |
s3:dbwrap: move dbwrap_delete() back to dbwrap.c, the core of the dbwrap subsystem
Diffstat (limited to 'source3/lib/dbwrap')
-rw-r--r-- | source3/lib/dbwrap/dbwrap.c | 14 | ||||
-rw-r--r-- | source3/lib/dbwrap/dbwrap_util.c | 15 |
2 files changed, 14 insertions, 15 deletions
diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c index 5b87fd3154..5054316271 100644 --- a/source3/lib/dbwrap/dbwrap.c +++ b/source3/lib/dbwrap/dbwrap.c @@ -78,3 +78,17 @@ TDB_DATA dbwrap_fetch(struct db_context *db, TALLOC_CTX *mem_ctx, return result; } + +NTSTATUS dbwrap_delete(struct db_context *db, TDB_DATA key) +{ + struct db_record *rec; + NTSTATUS status; + + rec = db->fetch_locked(db, talloc_tos(), key); + if (rec == NULL) { + return NT_STATUS_NO_MEMORY; + } + status = rec->delete_rec(rec); + TALLOC_FREE(rec); + return status; +} diff --git a/source3/lib/dbwrap/dbwrap_util.c b/source3/lib/dbwrap/dbwrap_util.c index a950d51404..1216e2e25f 100644 --- a/source3/lib/dbwrap/dbwrap_util.c +++ b/source3/lib/dbwrap/dbwrap_util.c @@ -456,21 +456,6 @@ NTSTATUS dbwrap_traverse(struct db_context *db, } - -NTSTATUS dbwrap_delete(struct db_context *db, TDB_DATA key) -{ - struct db_record *rec; - NTSTATUS status; - - rec = db->fetch_locked(db, talloc_tos(), key); - if (rec == NULL) { - return NT_STATUS_NO_MEMORY; - } - status = rec->delete_rec(rec); - TALLOC_FREE(rec); - return status; -} - NTSTATUS dbwrap_store(struct db_context *db, TDB_DATA key, TDB_DATA data, int flags) { |