summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-03-26 14:41:03 +0000
committerJeremy Allison <jra@samba.org>2014-03-31 22:52:14 +0200
commitd6db35d7a564ee556b74131ef4c3a3cdb8097e14 (patch)
tree1576430f97d46752b41efedbc8970d2eddf79f8e /lib
parentf995c6e6d4bfe4a50ca0017c722bdfb329121958 (diff)
downloadsamba-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')
-rw-r--r--lib/dbwrap/dbwrap_tdb.c6
-rw-r--r--lib/tdb_wrap/tdb_wrap.c32
-rw-r--r--lib/tdb_wrap/tdb_wrap.h6
3 files changed, 7 insertions, 37 deletions
diff --git a/lib/dbwrap/dbwrap_tdb.c b/lib/dbwrap/dbwrap_tdb.c
index 82a9916e2f9..a76d90f10bc 100644
--- a/lib/dbwrap/dbwrap_tdb.c
+++ b/lib/dbwrap/dbwrap_tdb.c
@@ -432,9 +432,9 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
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);
+ 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;
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_ */