mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
tdb_wrap: Make mutexes easier to use
This patch makes sure we work fine and open without mutexes if they are not supported. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
c8d05e934e
commit
911439639a
@ -149,6 +149,13 @@ struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
if (w == NULL) {
|
||||
|
||||
if (tdb_flags & TDB_MUTEX_LOCKING) {
|
||||
if (!tdb_runtime_check_for_robust_mutexes()) {
|
||||
tdb_flags &= ~TDB_MUTEX_LOCKING;
|
||||
}
|
||||
}
|
||||
|
||||
w = tdb_wrap_private_open(result, name, hash_size, tdb_flags,
|
||||
open_flags, mode);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user