summaryrefslogtreecommitdiff
path: root/source4/lib/ldb_wrap.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-23 15:24:40 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-23 15:24:40 +0200
commit7fb26774021986a08d03db968a7826ee64ea7410 (patch)
tree272d8e4f7671b48c95c817724b41d9c27de1e282 /source4/lib/ldb_wrap.c
parentfd01b27edd5a83306f4ce567e31d43641dd003b8 (diff)
parent1186579f94d81bc633b8f20e8ad8673313c8c39b (diff)
downloadsamba-7fb26774021986a08d03db968a7826ee64ea7410.tar.gz
samba-7fb26774021986a08d03db968a7826ee64ea7410.tar.bz2
samba-7fb26774021986a08d03db968a7826ee64ea7410.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into registry
(This used to be commit e8d96b61db1cddc2d8dca45e6e9b53d5c31ee5d4)
Diffstat (limited to 'source4/lib/ldb_wrap.c')
-rw-r--r--source4/lib/ldb_wrap.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/lib/ldb_wrap.c b/source4/lib/ldb_wrap.c
index 71ba37b479..f47d0d5d39 100644
--- a/source4/lib/ldb_wrap.c
+++ b/source4/lib/ldb_wrap.c
@@ -44,7 +44,7 @@ static void ldb_wrap_debug(void *context, enum ldb_debug_level level,
static void ldb_wrap_debug(void *context, enum ldb_debug_level level,
const char *fmt, va_list ap)
{
- int samba_level;
+ int samba_level = -1;
char *s = NULL;
switch (level) {
case LDB_DEBUG_FATAL:
@@ -94,6 +94,7 @@ static int ldb_wrap_destructor(struct ldb_context *ldb)
TODO: We need an error_string parameter
*/
struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
struct loadparm_context *lp_ctx,
const char *url,
struct auth_session_info *session_info,
@@ -103,7 +104,6 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
{
struct ldb_context *ldb;
int ret;
- struct event_context *ev;
char *real_url = NULL;
size_t *startup_blocks;
@@ -115,10 +115,9 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
ldb_set_modules_dir(ldb,
talloc_asprintf(ldb, "%s/ldb", lp_modulesdir(lp_ctx)));
- /* we want to use the existing event context if possible. This
- relies on the fact that in smbd, everything is a child of
- the main event_context */
- ev = event_context_find(ldb);
+ if (ev == NULL) {
+ return NULL;
+ }
if (ldb_set_opaque(ldb, "EventContext", ev)) {
talloc_free(ldb);