From 14750139639b3531e57a3ca3f9e481d6e458dc06 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 4 May 2011 10:28:15 +1000 Subject: lib/util Move source3 tdb_wrap_open() into the common code. This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in the top level build, these options are not available for these databases. However, having two different tdb_wrap lists is a worse fate, so this will do for now. Andrew Bartlett --- source3/lib/server_mutex.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/server_mutex.c') diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c index 1ba9d6a65b..9d38907a20 100644 --- a/source3/lib/server_mutex.c +++ b/source3/lib/server_mutex.c @@ -20,6 +20,7 @@ #include "includes.h" #include "system/filesys.h" +#include "lib/util/tdb_wrap.h" /* For reasons known only to MS, many of their NT/Win2k versions need serialised access only. Two connections at the same time -- cgit From d8cfca3a9bd2b6b6c562fd202377d95a98eb5472 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 5 May 2011 11:25:29 +0200 Subject: s3: only include tdb headers where needed. Guenther --- source3/lib/server_mutex.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/lib/server_mutex.c') diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c index 9d38907a20..6eac3182be 100644 --- a/source3/lib/server_mutex.c +++ b/source3/lib/server_mutex.c @@ -21,6 +21,7 @@ #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 -- cgit From d925b327f4703cc141c0a7f3eec912dba8440880 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:33 +0930 Subject: tdb_compat: Higher level API fixes. My previous patches fixed up all direct TDB callers, but there are a few utility functions and the db_context functions which are still using the old -1 / 0 return codes. It's clearer to fix up all the callers of these too, so everywhere is consistent: non-zero means an error. Signed-off-by: Rusty Russell --- source3/lib/server_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/server_mutex.c') diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c index 6eac3182be..dc65819197 100644 --- a/source3/lib/server_mutex.c +++ b/source3/lib/server_mutex.c @@ -70,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; -- cgit