]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:dbwrap_ctdb: let db_open_ctdb_ex() use g_lock_ctx_init_ex()
authorStefan Metzmacher <metze@samba.org>
Thu, 16 Jul 2026 09:17:17 +0000 (11:17 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 4 Aug 2026 09:51:32 +0000 (09:51 +0000)
This will allow db_open_ctdb_ex() to work without
global state to be setup first.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/dbwrap/dbwrap_ctdb.c

index 3e17a0ac367612a32c9c0a016e53eeb5c00eb96d..5e40c8a4892d5dab8a14b9d819390c0843d99361 100644 (file)
@@ -2980,9 +2980,12 @@ struct db_context *db_open_ctdb_ex(TALLOC_CTX *mem_ctx,
        }
 
        if (db_ctdb->allow_transactions) {
-               db_ctdb->lock_ctx = g_lock_ctx_init(db_ctdb, msg_ctx);
+               db_ctdb->lock_ctx = g_lock_ctx_init_ex(db_ctdb,
+                                                      msg_ctx,
+                                                      ev_ctx,
+                                                      ctdb_conn);
                if (db_ctdb->lock_ctx == NULL) {
-                       DEBUG(0, ("g_lock_ctx_init failed\n"));
+                       DEBUG(0, ("g_lock_ctx_init_ex failed\n"));
                        TALLOC_FREE(result);
                        return NULL;
                }