mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
dbwrap: Avoid passing lp_ctx to tdb_wrap_open in db_open_tdb
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
db630a5253
commit
acbc1ed703
@ -25,6 +25,7 @@
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "system/filesys.h"
|
||||
#include "ccan/str/str.h"
|
||||
#include "lib/param/param.h"
|
||||
|
||||
struct db_tdb_ctx {
|
||||
struct tdb_wrap *wtdb;
|
||||
@ -427,8 +428,13 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
result->lock_order = lock_order;
|
||||
|
||||
db_tdb->wtdb = tdb_wrap_open(db_tdb, name, hash_size, tdb_flags,
|
||||
open_flags, mode, lp_ctx);
|
||||
if (hash_size == 0) {
|
||||
hash_size = lpcfg_tdb_hash_size(lp_ctx, name);
|
||||
}
|
||||
|
||||
db_tdb->wtdb = tdb_wrap_open_(db_tdb, name, hash_size,
|
||||
lpcfg_tdb_flags(lp_ctx, tdb_flags),
|
||||
open_flags, mode);
|
||||
if (db_tdb->wtdb == NULL) {
|
||||
DEBUG(3, ("Could not open tdb: %s\n", strerror(errno)));
|
||||
goto fail;
|
||||
|
Loading…
Reference in New Issue
Block a user