aboutsummaryrefslogtreecommitdiff
path: root/src/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'src/extensions')
-rw-r--r--src/extensions/age_restriction/age_restriction.c8
-rw-r--r--src/extensions/extensions.c13
2 files changed, 9 insertions, 12 deletions
diff --git a/src/extensions/age_restriction/age_restriction.c b/src/extensions/age_restriction/age_restriction.c
index 481cb133..644a4ac6 100644
--- a/src/extensions/age_restriction/age_restriction.c
+++ b/src/extensions/age_restriction/age_restriction.c
@@ -94,7 +94,7 @@ age_restriction_load_config (
ext->config = &AR_config;
ext->enabled = true;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"loaded new age restriction config with age groups: %s\n",
TALER_age_mask_to_string (&mask));
@@ -112,7 +112,6 @@ static json_t *
age_restriction_manifest (
const struct TALER_Extension *ext)
{
- char *mask_str;
json_t *conf;
GNUNET_assert (NULL != ext);
@@ -124,12 +123,11 @@ age_restriction_manifest (
return json_null ();
}
- mask_str = TALER_age_mask_to_string (&AR_config.mask);
conf = GNUNET_JSON_PACK (
- GNUNET_JSON_pack_string ("age_groups", mask_str)
+ GNUNET_JSON_pack_string ("age_groups",
+ TALER_age_mask_to_string (&AR_config.mask))
);
- free (mask_str);
return GNUNET_JSON_PACK (
GNUNET_JSON_pack_bool ("critical", ext->critical),
diff --git a/src/extensions/extensions.c b/src/extensions/extensions.c
index 731ccfd0..fbbe874f 100644
--- a/src/extensions/extensions.c
+++ b/src/extensions/extensions.c
@@ -184,7 +184,7 @@ configure_extension (
{
struct LoadConfClosure *col = cls;
const char *name;
- char *lib_name;
+ char lib_name[1024] = {0};
struct TALER_Extension *extension;
if (GNUNET_OK != col->error)
@@ -199,17 +199,16 @@ configure_extension (
/* Load the extension library */
- GNUNET_asprintf (&lib_name,
+ GNUNET_snprintf (lib_name,
+ sizeof(lib_name),
"libtaler_extension_%s",
name);
/* Lower-case extension name, config is case-insensitive */
for (unsigned int i = 0; i < strlen (lib_name); i++)
- {
lib_name[i] = tolower (lib_name[i]);
- }
- extension = GNUNET_PLUGIN_load (
- lib_name,
- (void *) col->cfg);
+
+ extension = GNUNET_PLUGIN_load (lib_name,
+ (void *) col->cfg);
if (NULL == extension)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,