summaryrefslogtreecommitdiffstats
path: root/source3/lib/server_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/server_mutex.c')
-rw-r--r--source3/lib/server_mutex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c
index 1ba9d6a65be..dc658191970 100644
--- a/source3/lib/server_mutex.c
+++ b/source3/lib/server_mutex.c
@@ -20,6 +20,8 @@
#include "includes.h"
#include "system/filesys.h"
+#include "lib/util/tdb_wrap.h"
+#include "util_tdb.h"
/* For reasons known only to MS, many of their NT/Win2k versions
need serialised access only. Two connections at the same time
@@ -68,7 +70,7 @@ struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name,
}
if (tdb_lock_bystring_with_timeout(result->tdb->tdb, name,
- timeout) == -1) {
+ timeout) != 0) {
DEBUG(1, ("Could not get the lock for %s\n", name));
TALLOC_FREE(result);
return NULL;