diff options
Diffstat (limited to 'src/extensions/age_restriction/extension_age_restriction.c')
-rw-r--r-- | src/extensions/age_restriction/extension_age_restriction.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/extensions/age_restriction/extension_age_restriction.c b/src/extensions/age_restriction/extension_age_restriction.c index 1399fbc7..697d066f 100644 --- a/src/extensions/age_restriction/extension_age_restriction.c +++ b/src/extensions/age_restriction/extension_age_restriction.c @@ -105,8 +105,8 @@ age_restriction_load_json_config ( json_decref (ext->config_json); ext->enabled = true; - ext->config_json = json_copy(jconfig); - json_decref(jconfig); + ext->config_json = json_copy (jconfig); + json_decref (jconfig); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "loaded new age restriction config with age groups: %s\n", @@ -155,7 +155,7 @@ age_restriction_config_to_json ( GNUNET_JSON_pack_string ("age_groups", mask_str) ); - free(mask_str); + free (mask_str); return GNUNET_JSON_PACK ( GNUNET_JSON_pack_bool ("critical", ext->critical), @@ -188,6 +188,7 @@ struct TALER_Extension TE_extension_age_restriction = { .critical = false, .version = "1", .enabled = false, /* disabled per default */ + .has_config = true, /* we need to store configuration */ .config = NULL, .config_json = NULL, .disable = &age_restriction_disable, @@ -264,7 +265,7 @@ libtaler_extension_age_restriction_init (void *arg) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "[age restriction] setting age mask to %s with #groups: %d\n", - TALER_age_mask_to_string(&AR_config.mask), + TALER_age_mask_to_string (&AR_config.mask), __builtin_popcount (AR_config.mask.bits) - 1); TE_extension_age_restriction.config = &AR_config; |