diff options
author | Volker Lendecke <vl@samba.org> | 2014-03-26 14:41:03 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-03-31 22:52:14 +0200 |
commit | d6db35d7a564ee556b74131ef4c3a3cdb8097e14 (patch) | |
tree | 1576430f97d46752b41efedbc8970d2eddf79f8e /lib/tdb_wrap | |
parent | f995c6e6d4bfe4a50ca0017c722bdfb329121958 (diff) | |
download | samba-d6db35d7a564ee556b74131ef4c3a3cdb8097e14.tar.gz |
tdb_wrap: Remove tdb_wrap_open_ again
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/tdb_wrap')
-rw-r--r-- | lib/tdb_wrap/tdb_wrap.c | 32 | ||||
-rw-r--r-- | lib/tdb_wrap/tdb_wrap.h | 6 |
2 files changed, 4 insertions, 34 deletions
diff --git a/lib/tdb_wrap/tdb_wrap.c b/lib/tdb_wrap/tdb_wrap.c index cf24b97e796..970c91f1c72 100644 --- a/lib/tdb_wrap/tdb_wrap.c +++ b/lib/tdb_wrap/tdb_wrap.c @@ -123,9 +123,9 @@ fail: wrapped connection to a tdb database to close just talloc_free() the tdb_wrap pointer */ -struct tdb_wrap *tdb_wrap_open_(TALLOC_CTX *mem_ctx, - const char *name, int hash_size, int tdb_flags, - int open_flags, mode_t mode) +struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx, + const char *name, int hash_size, int tdb_flags, + int open_flags, mode_t mode) { struct tdb_wrap *result; struct tdb_wrap_private *w; @@ -175,29 +175,3 @@ fail: TALLOC_FREE(result); return NULL; } - -struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx, - const char *name, int hash_size, int tdb_flags, - int open_flags, mode_t mode, - struct loadparm_context *lp_ctx) -{ - if (!lpcfg_use_mmap(lp_ctx)) { - tdb_flags |= TDB_NOMMAP; - } - - if ((hash_size == 0) && (name != NULL)) { - const char *base; - base = strrchr_m(name, '/'); - - if (base != NULL) { - base += 1; - } else { - base = name; - } - hash_size = lpcfg_parm_int(lp_ctx, NULL, - "tdb_hashsize", base, 0); - } - - return tdb_wrap_open_(mem_ctx, name, hash_size, tdb_flags, open_flags, - mode); -} diff --git a/lib/tdb_wrap/tdb_wrap.h b/lib/tdb_wrap/tdb_wrap.h index 54d9a0a72e6..e44aed684f6 100644 --- a/lib/tdb_wrap/tdb_wrap.h +++ b/lib/tdb_wrap/tdb_wrap.h @@ -37,12 +37,8 @@ struct tdb_wrap { struct loadparm_context; -struct tdb_wrap *tdb_wrap_open_(TALLOC_CTX *mem_ctx, - const char *name, int hash_size, int tdb_flags, - int open_flags, mode_t mode); struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx, const char *name, int hash_size, int tdb_flags, - int open_flags, mode_t mode, - struct loadparm_context *lp_ctx); + int open_flags, mode_t mode); #endif /* _TDB_WRAP_H_ */ |