summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-04-21 17:58:23 -0400
committerSimo Sorce <idra@samba.org>2008-04-21 18:12:33 -0400
commit4e83011f72ba3df387512755a17760b42a7bf2f2 (patch)
tree8870bc1bf9181d3ed732db64324307fe533a07d6 /source4/lib/ldb
parent8a3e3391fb82c2ee8ef67dbded753d6fad564827 (diff)
downloadsamba-4e83011f72ba3df387512755a17760b42a7bf2f2.tar.gz
samba-4e83011f72ba3df387512755a17760b42a7bf2f2.tar.bz2
samba-4e83011f72ba3df387512755a17760b42a7bf2f2.zip
Remove more event_context_init() uses from function calls within deep down the code.
Make sure we pass around the event_context where we need it instead. All test but a few python ones fail. Jelmer promised to fix them. (This used to be commit 3045d391626fba169aa26be52174883e18d323e9)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
index 79958a86eb..6b50b2f5eb 100644
--- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c
+++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
@@ -737,6 +737,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
struct ildb_private *ildb;
NTSTATUS status;
struct cli_credentials *creds;
+ struct event_context *event_ctx;
module = talloc(ldb, struct ldb_module);
if (!module) {
@@ -756,8 +757,19 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
}
module->private_data = ildb;
ildb->module = module;
- ildb->ldap = ldap4_new_connection(ildb, ldb_get_opaque(ldb, "loadparm"),
- ldb_get_opaque(ldb, "EventContext"));
+
+ event_ctx = ldb_get_opaque(ldb, "EventContext");
+
+ /* FIXME: We must make the event context an explicit parameter, but we
+ * need to build the events library separately first. Hack a new event
+ * context so that CMD line utilities work until we have libevents for
+ * standalone builds ready */
+ if (event_ctx == NULL) {
+ event_ctx = event_context_init(NULL);
+ }
+
+ ildb->ldap = ldap4_new_connection(ildb, ldb_get_opaque(ldb, "loadparm"),
+ event_ctx);
if (!ildb->ldap) {
ldb_oom(ldb);
goto failed;