aboutsummaryrefslogtreecommitdiff
path: root/src/extensions/age_restriction/extension_age_restriction.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-10-02 22:51:54 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2022-10-02 22:51:54 +0200
commit72cbf663952bc95888aa2187894da78725e7590c (patch)
tree0d0f9758e082a36487a85fd4335f0342f5c1e6f6 /src/extensions/age_restriction/extension_age_restriction.c
parent04c7e0bb337dd88dde60293d94d2e192a8fc2ff5 (diff)
WiP: added auction_brandt as extension
- added an extension to handle auctions via libbrandt - /extensions/auction_brandt GET and POST handler defined - initial parsing of transcript.json implemented, yet WiP - multiple cleanups and changes to extension handling
Diffstat (limited to 'src/extensions/age_restriction/extension_age_restriction.c')
-rw-r--r--src/extensions/age_restriction/extension_age_restriction.c9
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;