mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
s3:dbwrap: allow NULL parser for dbwrap_parse_record()
Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
f5b7d87c25
commit
99fa6fa4a3
@ -174,11 +174,20 @@ NTSTATUS dbwrap_traverse_read(struct db_context *db,
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
static int dbwrap_null_parser(TDB_DATA key, TDB_DATA val, void* data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dbwrap_parse_record(struct db_context *db, TDB_DATA key,
|
||||
int (*parser)(TDB_DATA key, TDB_DATA data,
|
||||
void *private_data),
|
||||
void *private_data)
|
||||
{
|
||||
if (parser == NULL) {
|
||||
parser = dbwrap_null_parser;
|
||||
}
|
||||
|
||||
if (db->parse_record) {
|
||||
return db->parse_record(db, key, parser, private_data);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user