1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

dbwrap: Add dbwrap_record_storev

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2016-09-13 12:25:14 +02:00 committed by Ralph Boehme
parent 09915bf8e5
commit 10c59f5b20
2 changed files with 10 additions and 2 deletions

View File

@ -82,17 +82,23 @@ TDB_DATA dbwrap_record_get_value(const struct db_record *rec)
return rec->value;
}
NTSTATUS dbwrap_record_store(struct db_record *rec, TDB_DATA data, int flags)
NTSTATUS dbwrap_record_storev(struct db_record *rec,
const TDB_DATA *dbufs, int num_dbufs, int flags)
{
NTSTATUS status;
status = rec->storev(rec, &data, 1, flags);
status = rec->storev(rec, dbufs, num_dbufs, flags);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
return NT_STATUS_OK;
}
NTSTATUS dbwrap_record_store(struct db_record *rec, TDB_DATA data, int flags)
{
return dbwrap_record_storev(rec, &data, 1, flags);
}
NTSTATUS dbwrap_record_delete(struct db_record *rec)
{
NTSTATUS status;

View File

@ -72,6 +72,8 @@ enum dbwrap_req_state {
TDB_DATA dbwrap_record_get_key(const struct db_record *rec);
TDB_DATA dbwrap_record_get_value(const struct db_record *rec);
NTSTATUS dbwrap_record_store(struct db_record *rec, TDB_DATA data, int flags);
NTSTATUS dbwrap_record_storev(struct db_record *rec,
const TDB_DATA *dbufs, int num_dbufs, int flags);
NTSTATUS dbwrap_record_delete(struct db_record *rec);
struct db_record *dbwrap_fetch_locked(struct db_context *db,
TALLOC_CTX *mem_ctx,