10 int module_load(const char* file_name, int argc, char *argv[]) {
11 lt_dlhandle* module = NULL;
12 int (*initialize) LDAP_P((int argc, char *argv[]));
15 Debug(LDAP_DEBUG_ANY, "lt_dlinit failed: %s\n", lt_dlerror(), 0, 0);
19 if ((module = lt_dlopen(file_name)) == NULL) {
20 Debug(LDAP_DEBUG_ANY, "lt_dlopen failed: (%s) %s\n", file_name,
25 Debug(LDAP_DEBUG_CONFIG, "loaded module %s\n", file_name, 0, 0);
27 if ((initialize = lt_dlsym(module, "init_module")))
28 return initialize(argc, argv);
30 Debug(LDAP_DEBUG_CONFIG, "module %s: no init_module() function found\n",
35 int module_path(const char *path) {
38 Debug(LDAP_DEBUG_ANY, "lt_dlinit failed: %s\n", lt_dlerror(), 0, 0);
42 return lt_dlsetsearchpath( path );
44 #endif /* SLAPD_MODULES */