summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-03-26 14:35:31 +0000
committerJeremy Allison <jra@samba.org>2014-03-31 22:52:13 +0200
commit12b8df1ba277ffc8e48b4c96aa4e48bf36e4e220 (patch)
tree82a3eeece6d97ba4e0c23e4aea2d25b183d8deec /source3/lib
parentd169d0d9e2a22b96d1d41e9e4adde524965509c7 (diff)
downloadsamba-12b8df1ba277ffc8e48b4c96aa4e48bf36e4e220.tar.gz
samba-12b8df1ba277ffc8e48b4c96aa4e48bf36e4e220.tar.xz
samba-12b8df1ba277ffc8e48b4c96aa4e48bf36e4e220.zip
messaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_parent_init
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/messages_local.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/lib/messages_local.c b/source3/lib/messages_local.c
index 295646a3a06..1a3f3b27f24 100644
--- a/source3/lib/messages_local.c
+++ b/source3/lib/messages_local.c
@@ -174,6 +174,7 @@ bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx)
{
struct tdb_wrap *db;
struct loadparm_context *lp_ctx;
+ const char *fname;
lp_ctx = loadparm_init_s3(mem_ctx, loadparm_s3_helpers());
if (lp_ctx == NULL) {
@@ -187,9 +188,12 @@ bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx)
* work.
*/
- db = tdb_wrap_open(mem_ctx, lock_path("messages.tdb"), 0,
- TDB_CLEAR_IF_FIRST|TDB_DEFAULT|TDB_VOLATILE|TDB_INCOMPATIBLE_HASH,
- O_RDWR|O_CREAT,0600, lp_ctx);
+ fname = lock_path("messages.tdb");
+ db = tdb_wrap_open_(
+ mem_ctx, fname, lpcfg_tdb_hash_size(lp_ctx, fname),
+ lpcfg_tdb_flags(lp_ctx, TDB_CLEAR_IF_FIRST|TDB_DEFAULT|
+ TDB_VOLATILE|TDB_INCOMPATIBLE_HASH),
+ O_RDWR|O_CREAT,0600);
talloc_unlink(mem_ctx, lp_ctx);
if (db == NULL) {
DEBUG(1, ("could not open messaging.tdb: %s\n",