diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-05-09 20:40:43 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-05-09 21:45:59 +0200 |
commit | dc5b0fb0d35b9758f6eac7b0bd144db00eef7216 (patch) | |
tree | 01a0c662abce66d32144e599f1af84d99391a80c /src/extensions | |
parent | d1379e492de19070a8f7c2c3dba70f39fe956888 (diff) |
Fix age mask parsing from config
- initialize age mask to zero
- drop default bitstring for age mask, use string instead
-remove default age mask bits, use string instead
-strdup
Diffstat (limited to 'src/extensions')
-rw-r--r-- | src/extensions/age_restriction/age_restriction.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/extensions/age_restriction/age_restriction.c b/src/extensions/age_restriction/age_restriction.c index 2d6d0cbd7..481cb133d 100644 --- a/src/extensions/age_restriction/age_restriction.c +++ b/src/extensions/age_restriction/age_restriction.c @@ -207,10 +207,10 @@ libtaler_extension_age_restriction_init (void *arg) return NULL; } - mask.bits = TALER_EXTENSION_AGE_RESTRICTION_DEFAULT_AGE_MASK; + if (NULL == groups) + groups = GNUNET_strdup (TALER_EXTENSION_AGE_RESTRICTION_DEFAULT_AGE_GROUPS); - if ((groups != NULL) && - (GNUNET_OK != TALER_parse_age_group_string (groups, &mask))) + if (GNUNET_OK != TALER_parse_age_group_string (groups, &mask)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "[age restriction] couldn't parse age groups: '%s'\n", |