From: Stefan Metzmacher Date: Thu, 16 Jul 2026 09:17:17 +0000 (+0200) Subject: s3:dbwrap_ctdb: let db_open_ctdb_ex() use g_lock_ctx_init_ex() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ba8d4f185e552c41fbf3ca8d74c8ee487fe5cc2;p=thirdparty%2Fsamba.git s3:dbwrap_ctdb: let db_open_ctdb_ex() use g_lock_ctx_init_ex() This will allow db_open_ctdb_ex() to work without global state to be setup first. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 3e17a0ac367..5e40c8a4892 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -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; }