diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-17 03:35:59 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:50:38 +0100 |
commit | cb62bbbb7c2ee542a3a5f978ed25e501825a44d7 (patch) | |
tree | 3442b8c96280e85aa8c2b37cf922c55c699471a5 /source4/lib/ldb/common/ldb.c | |
parent | 07beaf09c95a06636cb029fcc2dbbeb7293879ba (diff) | |
download | samba-cb62bbbb7c2ee542a3a5f978ed25e501825a44d7.tar.gz samba-cb62bbbb7c2ee542a3a5f978ed25e501825a44d7.tar.xz samba-cb62bbbb7c2ee542a3a5f978ed25e501825a44d7.zip |
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)
Diffstat (limited to 'source4/lib/ldb/common/ldb.c')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index f687e152d30..87f791cb387 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); } } |