extern "C" {
#endif
-typedef void *lt_dlhandle;
+typedef void *fr_dlhandle;
-lt_dlhandle lt_dlopenext(char const *name);
-void *lt_dlsym(lt_dlhandle handle, char const *symbol);
-int lt_dlclose(lt_dlhandle handle);
-char const *lt_dlerror(void);
+fr_dlhandle fr_dlopenext(char const *name);
+void *fr_dlsym(fr_dlhandle handle, char const *symbol);
+int fr_dlclose(fr_dlhandle handle);
+char const *fr_dlerror(void);
/*
* Keep track of which modules we've loaded.
typedef struct module_entry_t {
char name[MAX_STRING_LEN];
module_t const *module;
- lt_dlhandle handle;
+ fr_dlhandle handle;
} module_entry_t;
typedef struct fr_module_hup_t fr_module_hup_t;
{ NULL, 0 },
};
-static int _free_proto_handle(lt_dlhandle *handle)
+static int _free_proto_handle(fr_dlhandle *handle)
{
dlclose(*handle);
return 0;
rad_listen_t *this;
CONF_PAIR *cp;
char const *value;
- lt_dlhandle handle;
+ fr_dlhandle handle;
CONF_SECTION *server_cs;
char buffer[32];
}
snprintf(buffer, sizeof(buffer), "proto_%s", value);
- handle = lt_dlopenext(buffer);
+ handle = fr_dlopenext(buffer);
if (handle) {
fr_protocol_t *proto;
- lt_dlhandle *marker;
+ fr_dlhandle *marker;
proto = dlsym(handle, buffer);
if (!proto) {
/*
* Ensure handle gets closed if config section gets freed
*/
- marker = talloc(cs, lt_dlhandle);
+ marker = talloc(cs, fr_dlhandle);
*marker = handle;
talloc_set_destructor(marker, _free_proto_handle);
return 0;
}
-lt_dlhandle lt_dlopenext(char const *name)
+fr_dlhandle fr_dlopenext(char const *name)
{
int flags = RTLD_NOW;
void *handle;
return handle;
}
-void *lt_dlsym(lt_dlhandle handle, char const *symbol)
+void *fr_dlsym(fr_dlhandle handle, char const *symbol)
{
return dlsym(handle, symbol);
}
-int lt_dlclose(lt_dlhandle handle)
+int fr_dlclose(fr_dlhandle handle)
{
if (!handle) return 0;
return dlclose(handle);
}
-char const *lt_dlerror(void)
+char const *fr_dlerror(void)
{
return dlerror();
}
/*
* Keep the handle around so we can dlclose() it.
*/
- handle = lt_dlopenext(module_name);
+ handle = fr_dlopenext(module_name);
if (!handle) {
cf_log_err_cs(cs, "Failed to link to module '%s': %s", module_name, fr_strerror());
return NULL;
/*
* Load the appropriate driver for our database
*/
- inst->handle = lt_dlopenext(inst->driver_name);
+ inst->handle = fr_dlopenext(inst->driver_name);
if (!inst->handle) {
cf_log_err_cs(conf, "Could not link driver %s: %s", inst->driver_name, dlerror());
cf_log_err_cs(conf, "Make sure it (and all its dependent libraries!) are in the search path"
/*
* Link the loaded EAP-Type
*/
- method->handle = lt_dlopenext(mod_name);
+ method->handle = fr_dlopenext(mod_name);
if (!method->handle) {
ERROR("rlm_eap (%s): Failed to link %s: %s", inst->xlat_name, mod_name, fr_strerror());
typedef struct eap_module {
char const *name;
rlm_eap_module_t *type;
- lt_dlhandle handle;
+ fr_dlhandle handle;
CONF_SECTION *cs;
void *instance;
} eap_module_t;
*
* We need this to check if the sql_fields callback is provided.
*/
- inst->handle = lt_dlopenext(inst->config->sql_driver_name);
+ inst->handle = fr_dlopenext(inst->config->sql_driver_name);
if (!inst->handle) {
ERROR("Could not link driver %s: %s", inst->config->sql_driver_name, fr_strerror());
ERROR("Make sure it (and all its dependent libraries!) are in the search path of your system's ld");