we need lt_dlinit()

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2538 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
nils 2005-09-05 17:05:26 +00:00
parent d744a6e5f5
commit ffb7928f6e
1 changed files with 7 additions and 1 deletions

View File

@ -33,14 +33,20 @@ C_LoadModule(const char *mspec, CK_FUNCTION_LIST_PTR_PTR funcs)
CK_RV (*c_get_function_list)(CK_FUNCTION_LIST_PTR_PTR);
int rv;
lt_dlinit();
mod = (sc_pkcs11_module_t *) calloc(1, sizeof(*mod));
mod->_magic = MAGIC;
if (mspec == NULL)
mspec = PKCS11_DEFAULT_MODULE_NAME;
mod->handle = lt_dlopen(mspec);
if (mod->handle == NULL)
if (mod->handle == NULL) {
#if 0
fprintf(stderr, "lt_dlopen failed: %s\n", lt_dlerror());
#endif
goto failed;
}
/* Get the list of function pointers */
c_get_function_list = (CK_RV (*)(CK_FUNCTION_LIST_PTR_PTR))