diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-10-05 16:07:09 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-10-05 16:07:09 +0200 |
commit | 2524dfc8d318a8f765e1600f1ecde54bc6c5a921 (patch) | |
tree | a0c485505b7d0e5538a39ff414f731b1082a0dae /src/exchange/taler-exchange-httpd_keys.c | |
parent | 477d009cb0aa529294b298d5ba629cdf904e210c (diff) |
refactor extensions: config -> manifest
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keys.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_keys.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c index 4761f314..cc8759f0 100644 --- a/src/exchange/taler-exchange-httpd_keys.c +++ b/src/exchange/taler-exchange-httpd_keys.c @@ -837,7 +837,7 @@ load_age_mask (const char*section_name) if (GNUNET_OK == ret) { - if (! TEH_age_restriction_config.enabled) + if (! TEH_age_restriction_enabled) GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "age restriction set in section %s, yet, age restriction is not enabled\n", section_name); @@ -1907,7 +1907,7 @@ create_krd (struct TEH_KeyStateHandle *ksh, iter = iter->next) { const struct TALER_Extension *extension = iter->extension; - json_t *ext; + json_t *manifest; int r; /* skip if not enabled */ @@ -1917,26 +1917,14 @@ create_krd (struct TEH_KeyStateHandle *ksh, /* flag our findings so far */ has_extensions = true; - ext = GNUNET_JSON_PACK ( - GNUNET_JSON_pack_bool ("critical", - extension->critical), - GNUNET_JSON_pack_string ("version", - extension->version) - ); - GNUNET_assert (NULL != ext); - if (extension->has_config) - { - GNUNET_assert (extension->config_json); - json_object_set_new (ext, - "config", - extension->config_json); - } + manifest = extension->manifest(extension); + GNUNET_assert(manifest); r = json_object_set_new ( extensions, extension->name, - ext); + manifest); GNUNET_assert (0 == r); } |