summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-08-17 08:40:53 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:55 +0200
commit2d52f6f8f5ea579fbbfff2d42a4ba9ed897a60ff (patch)
treeb40477e56ff2c689b1940dfd3f2ea153bd0ac11f /source3/lib
parent663c661b11396076a079a99d1f66fafb732af1d8 (diff)
downloadsamba-2d52f6f8f5ea579fbbfff2d42a4ba9ed897a60ff.tar.gz
samba-2d52f6f8f5ea579fbbfff2d42a4ba9ed897a60ff.tar.bz2
samba-2d52f6f8f5ea579fbbfff2d42a4ba9ed897a60ff.zip
s3:dbwrap: move dbwrap_traverse() to dbwrap.c, the core of the dbrwap subsystem
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap/dbwrap.c8
-rw-r--r--source3/lib/dbwrap/dbwrap_util.c9
2 files changed, 8 insertions, 9 deletions
diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c
index e9baa13c1b..f0d61a9a2f 100644
--- a/source3/lib/dbwrap/dbwrap.c
+++ b/source3/lib/dbwrap/dbwrap.c
@@ -108,3 +108,11 @@ NTSTATUS dbwrap_delete(struct db_context *db, TDB_DATA key)
TALLOC_FREE(rec);
return status;
}
+
+NTSTATUS dbwrap_traverse(struct db_context *db,
+ int (*f)(struct db_record*, void*),
+ void *private_data)
+{
+ int ret = db->traverse(db, f, private_data);
+ return (ret < 0) ? NT_STATUS_INTERNAL_DB_CORRUPTION : NT_STATUS_OK;
+}
diff --git a/source3/lib/dbwrap/dbwrap_util.c b/source3/lib/dbwrap/dbwrap_util.c
index 9ca781caf2..b9963f2706 100644
--- a/source3/lib/dbwrap/dbwrap_util.c
+++ b/source3/lib/dbwrap/dbwrap_util.c
@@ -447,15 +447,6 @@ NTSTATUS dbwrap_trans_traverse(struct db_context *db,
return dbwrap_trans_do(db, dbwrap_trans_traverse_action, &ctx);
}
-NTSTATUS dbwrap_traverse(struct db_context *db,
- int (*f)(struct db_record*, void*),
- void *private_data)
-{
- int ret = db->traverse(db, f, private_data);
- return (ret < 0) ? NT_STATUS_INTERNAL_DB_CORRUPTION : NT_STATUS_OK;
-}
-
-
NTSTATUS dbwrap_delete_bystring(struct db_context *db, const char *key)
{
return dbwrap_delete(db, string_term_tdb_data(key));