diff options
author | Volker Lendecke <vl@samba.org> | 2011-12-09 11:22:50 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-12-15 17:41:53 +0100 |
commit | 8eeb3ff753b36f8d33ae55a9ab2d8cc52fffa1a4 (patch) | |
tree | 5928dc9f3f591eb356aff0b8a73425722cfaa903 /source3 | |
parent | f6d8f7440c4f7e25574045a4e42a770d48d4c43d (diff) | |
download | samba-8eeb3ff753b36f8d33ae55a9ab2d8cc52fffa1a4.tar.gz samba-8eeb3ff753b36f8d33ae55a9ab2d8cc52fffa1a4.tar.bz2 samba-8eeb3ff753b36f8d33ae55a9ab2d8cc52fffa1a4.zip |
s3-dbwrap: All relevant backends provide parse_record(). Remove the fallback.
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Dec 15 17:41:53 CET 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/dbwrap/dbwrap.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c index 336f60cf75..c551bfdeca 100644 --- a/source3/lib/dbwrap/dbwrap.c +++ b/source3/lib/dbwrap/dbwrap.c @@ -34,38 +34,6 @@ static int dbwrap_fallback_exists(struct db_context *db, TDB_DATA key) return NT_STATUS_IS_OK(status) ? 1 : 0; } -/* - * Fall back using fetch if no genuine parse operation is provided - */ - -static NTSTATUS dbwrap_fallback_parse_record(struct db_context *db, TDB_DATA key, - void (*parser)(TDB_DATA key, - TDB_DATA data, - void *private_data), - void *private_data) -{ - struct db_record *rec; - TDB_DATA data; - - rec = dbwrap_fetch_locked(db, talloc_tos(), key); - if (rec == NULL) { - return NT_STATUS_NOT_FOUND; - } - data = dbwrap_record_get_value(rec); - - data.dptr = talloc_memdup(talloc_tos(), data.dptr, data.dsize); - TALLOC_FREE(rec); - if (data.dptr == NULL) { - return NT_STATUS_NO_MEMORY; - } - - parser(key, data, private_data); - - TALLOC_FREE(data.dptr); - return NT_STATUS_OK; -} - - static int delete_record(struct db_record *rec, void *data) { NTSTATUS status = dbwrap_record_delete(rec); @@ -243,11 +211,6 @@ NTSTATUS dbwrap_parse_record(struct db_context *db, TDB_DATA key, if (parser == NULL) { parser = dbwrap_null_parser; } - - if (db->parse_record == NULL) { - return dbwrap_fallback_parse_record(db, key, parser, - private_data); - } return db->parse_record(db, key, parser, private_data); } |