From cb62bbbb7c2ee542a3a5f978ed25e501825a44d7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Dec 2007 03:35:59 +0100 Subject: r26481: Make function for loading symbol from DSO more generic, and allow modules to provide an ops table directly rather than an initialization function. (This used to be commit a71419a73a869c24121005ccbbcb4396f888888b) --- source4/lib/ldb/common/ldb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib/ldb/common/ldb.c') diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index f687e152d3..87f791cb38 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -126,7 +126,11 @@ int ldb_connect_backend(struct ldb_context *ldb, const char *url, const char *op fn = ldb_find_backend(backend); if (fn == NULL) { - if (ldb_try_load_dso(ldb, backend) == 0) { + int (*init_fn) (void); + + init_fn = ldb_dso_load_symbol(ldb, backend, + "init_module"); + if (init_fn != NULL && init_fn() == 0) { fn = ldb_find_backend(backend); } } -- cgit