cd->dl_handle = lt_dlopenext(cd->dl_path);
if (cd->dl_handle == NULL) {
+ const char *errmsg = lt_dlerror();
+ if (errmsg == NULL) {
+ errmsg = "unknown error";
+ }
dlopen_log(ISC_LOG_ERROR,
"dlz_dlopen failed to open library '%s': %s",
- cd->dl_path, lt_dlerror());
+ cd->dl_path, errmsg);
result = ISC_R_FAILURE;
goto failed;
}
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR,
"failed to lookup symbol %s in "
- "dyndb module '%s': %s",
+ "DynDB module '%s': %s",
symbol_name, filename, errmsg);
return (ISC_R_FAILURE);
}
handle = lt_dlopen(filename);
if (handle == NULL) {
+ const char *errmsg = lt_dlerror();
+ if (errmsg == NULL) {
+ errmsg = "unknown error";
+ }
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR,
+ "failed to dlopen() DynDB instance '%s' driver "
+ "'%s': %s",
+ instname, filename, errmsg);
CHECK(ISC_R_FAILURE);
}