Now that we pass down the event context, start removing calls to
authorSimo Sorce <idra@samba.org>
Sun, 15 Jun 2008 15:11:14 +0000 (11:11 -0400)
committerSimo Sorce <idra@samba.org>
Sun, 15 Jun 2008 15:11:14 +0000 (11:11 -0400)
event_context_init() where possible

source/lib/ldb/common/ldb.c
source/lib/ldb/ldb_ildap/ldb_ildap.c

index 3e725a5c093c4ea369e65013cd0084038327b74b..22cd46d13f8faa38783fb1011648c64ca4c90348 100644 (file)
@@ -45,6 +45,8 @@ struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx)
        int ret;
 
        ldb = talloc_zero(mem_ctx, struct ldb_context);
+       /* FIXME: Hack a new event context so that CMD line utilities work
+        * until we have them all converted */
        if (ev_ctx == NULL) {
                ev_ctx = event_context_init(ldb);
        }
index 478df3662dfe75edbf493f71ece301bd82e1bd38..d1677032f0b98bb75e7a9d5e36850b8c4a4d5473 100644 (file)
@@ -760,14 +760,6 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
 
        event_ctx = ldb_get_event_context(ldb);
 
-       /* 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 them all
-        * converted */
-       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) {