9 int load_module(const char* file_name, int argc, char *argv[]) {
10 lt_dlhandle* module = NULL;
11 int (*initialize) LDAP_P((int argc, char *argv[]));
14 Debug(LDAP_DEBUG_ANY, "lt_dlinit failed: %s\n", lt_dlerror(), 0, 0);
18 if ((module = lt_dlopen(file_name)) == NULL) {
19 Debug(LDAP_DEBUG_ANY, "lt_dlopen failed: (%s) %s\n", file_name,
24 Debug(LDAP_DEBUG_CONFIG, "loaded module %s\n", file_name, 0, 0);
26 if ((initialize = lt_dlsym(module, "init_module")))
27 return initialize(argc, argv);
29 Debug(LDAP_DEBUG_CONFIG, "module %s: no init_module() function found\n",
34 #endif /* SLAPD_MODULES */