static int dict_dlopen(fr_dict_t *dict, char const *name)
{
char *module_name;
+ char *p, *q;
if (!name) return 0;
module_name = talloc_typed_asprintf(NULL, "libfreeradius-%s", name);
+ for (p = module_name, q = p + talloc_array_length(p) - 1; p < q; p++) *p = tolower(*p);
/*
* Pass in dict as the uctx so that we can get at it in
snprintf(buffer, sizeof(buffer), "%s_%s", dl->name, init->symbol);
+ /*
+ * '-' is not a valid symbol character in
+ * C. But "libfreeradius-radius" is a
+ * valid library name. So we hash things together.
+ */
for (p = buffer; *p != '\0'; p++) {
- if (isupper((int) *p)) *p = tolower((int) *p);
if (*p == '-') *p = '_';
}