s3: Remove talloc_autofree_context() from messaging_tdb_parent_init()
authorVolker Lendecke <vl@samba.org>
Sat, 25 Sep 2010 22:56:33 +0000 (15:56 -0700)
committerVolker Lendecke <vl@samba.org>
Sun, 26 Sep 2010 01:29:28 +0000 (03:29 +0200)
source3/include/messages.h
source3/lib/messages_local.c
source3/smbd/server.c

index bf5e5de26c3a3028762dc9fe1d9b1424dec5d361..d4f7d2081b888a4d68b1b0c641b840f86d8a5b68 100644 (file)
@@ -111,7 +111,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
                            TALLOC_CTX *mem_ctx,
                            struct messaging_backend **presult);
 
-bool messaging_tdb_parent_init(void);
+bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx);
 
 NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
                              TALLOC_CTX *mem_ctx,
index c475773a31f84e899064c80183adc81e1e1c9fda..542d49e2dd7c1fa3bdf9c7ea207ae1f293231d7f 100644 (file)
@@ -133,7 +133,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
        return NT_STATUS_OK;
 }
 
-bool messaging_tdb_parent_init(void)
+bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx)
 {
        struct tdb_wrap *db;
 
@@ -143,8 +143,7 @@ bool messaging_tdb_parent_init(void)
         * work.
         */
 
-       db = tdb_wrap_open(talloc_autofree_context(),
-                          lock_path("messages.tdb"), 0,
+       db = tdb_wrap_open(mem_ctx, lock_path("messages.tdb"), 0,
                           TDB_CLEAR_IF_FIRST|TDB_DEFAULT|TDB_VOLATILE,
                           O_RDWR|O_CREAT,0600);
        if (db == NULL) {
index 8a55f933f7d22839dcfea4f643b0f02cc2f1c778..6ae678dbde8bf4d69b33dbaefd6a2f823d73fd14 100644 (file)
@@ -1126,7 +1126,7 @@ extern void build_options(bool screen);
        if (!locking_init())
                exit(1);
 
-       if (!messaging_tdb_parent_init()) {
+       if (!messaging_tdb_parent_init(smbd_event_context())) {
                exit(1);
        }