1
0
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:
Volker Lendecke 2014-09-30 11:04:21 +00:00 committed by Michael Adam
parent c8d05e934e
commit 911439639a

View File

@ -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 {