- /*
+ /*
Unix SMB/CIFS implementation.
trivial database library
/* Try to clean dead ones from old traverses */
current = tlock->off;
tlock->off = rec->next;
- if (!(tdb->read_only || tdb->traverse_read) &&
+ if (!(tdb->read_only || tdb->traverse_read) &&
tdb_do_delete(tdb, current, rec) != 0)
goto fail;
}
if fn is NULL then it is not called
a non-zero return value from fn() indicates that the traversal should stop
*/
-static int tdb_traverse_internal(struct tdb_context *tdb,
+static int tdb_traverse_internal(struct tdb_context *tdb,
tdb_traverse_func fn, void *private_data,
struct tdb_traverse_lock *tl)
{
}
count++;
/* now read the full record */
- key.dptr = tdb_alloc_read(tdb, tl->off + sizeof(rec),
+ key.dptr = tdb_alloc_read(tdb, tl->off + sizeof(rec),
rec.key_len + rec.data_len);
if (!key.dptr) {
ret = -1;
/*
a write style traverse - temporarily marks the db read only
*/
-_PUBLIC_ int tdb_traverse_read(struct tdb_context *tdb,
+_PUBLIC_ int tdb_traverse_read(struct tdb_context *tdb,
tdb_traverse_func fn, void *private_data)
{
struct tdb_traverse_lock tl = { NULL, 0, 0, F_RDLCK };
WARNING: The data buffer given to the callback fn does NOT meet the
alignment restrictions malloc gives you.
*/
-_PUBLIC_ int tdb_traverse(struct tdb_context *tdb,
+_PUBLIC_ int tdb_traverse(struct tdb_context *tdb,
tdb_traverse_func fn, void *private_data)
{
struct tdb_traverse_lock tl = { NULL, 0, 0, F_WRLCK };