diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-03-28 01:33:32 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2004-03-28 01:33:32 +0000 |
commit | 2fe43ec90f6c76ced5e697f4a26630bd72accdc5 (patch) | |
tree | 7f51a6434a5486e4d3a2691ba6ed3ab16d5c96c7 /source4/lib/tdb/tdb.c | |
parent | 4217c609a8c932967aa2641c5e24dde413efb575 (diff) | |
download | samba-2fe43ec90f6c76ced5e697f4a26630bd72accdc5.tar.gz samba-2fe43ec90f6c76ced5e697f4a26630bd72accdc5.tar.bz2 samba-2fe43ec90f6c76ced5e697f4a26630bd72accdc5.zip |
added a private pointer to tdb_traverse() to allow callers to supply
data to their traverse function
(This used to be commit 76bf816485bf869c293791659da5dff2425d2d32)
Diffstat (limited to 'source4/lib/tdb/tdb.c')
-rw-r--r-- | source4/lib/tdb/tdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/tdb/tdb.c b/source4/lib/tdb/tdb.c index 1fef5d54fa..8fbf128914 100644 --- a/source4/lib/tdb/tdb.c +++ b/source4/lib/tdb/tdb.c @@ -1292,7 +1292,7 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock, if fn is NULL then it is not called a non-zero return value from fn() indicates that the traversal should stop */ -int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn) +int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *private) { TDB_DATA key, dbuf; struct list_struct rec; @@ -1330,7 +1330,7 @@ int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn) ret = -1; goto out; } - if (fn && fn(tdb, key, dbuf)) { + if (fn && fn(tdb, key, dbuf, private)) { /* They want us to terminate traversal */ ret = count; if (unlock_record(tdb, tl.off) != 0) { |