diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-17 12:23:44 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-17 12:23:44 +0200 |
commit | 21fc7673780aa1d7c0caab7b17ff9171238913ba (patch) | |
tree | 53556069de7ca28e4721473d679c559c71df22b8 /source4/lib/ldb_wrap.c | |
parent | ab07a60d6ed1d9704590747ac69bbaa22bef2df3 (diff) | |
download | samba-21fc7673780aa1d7c0caab7b17ff9171238913ba.tar.gz samba-21fc7673780aa1d7c0caab7b17ff9171238913ba.tar.xz samba-21fc7673780aa1d7c0caab7b17ff9171238913ba.zip |
Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a284c044704322446c94351c2decff91)
Diffstat (limited to 'source4/lib/ldb_wrap.c')
-rw-r--r-- | source4/lib/ldb_wrap.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/lib/ldb_wrap.c b/source4/lib/ldb_wrap.c index 71ba37b479..b71adcbca2 100644 --- a/source4/lib/ldb_wrap.c +++ b/source4/lib/ldb_wrap.c @@ -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) { + ev = event_context_find(mem_ctx); + } if (ldb_set_opaque(ldb, "EventContext", ev)) { talloc_free(ldb); |