diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-01-02 17:47:06 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-01-02 17:47:06 +0100 |
commit | 8e6b086753d66f838a2cbdd207691c1fc5fb3a88 (patch) | |
tree | 54f2bda00e881e694f1f4442decf27dd3a94b7c5 /src/extensions | |
parent | 4f0d85935f5577b9fc6feea5603ac7a0fa210625 (diff) |
mark parameter as const; free correct object
Diffstat (limited to 'src/extensions')
-rw-r--r-- | src/extensions/age_restriction/age_restriction.c | 5 | ||||
-rw-r--r-- | src/extensions/extensions.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/extensions/age_restriction/age_restriction.c b/src/extensions/age_restriction/age_restriction.c index cc98aadba..2d6d0cbd7 100644 --- a/src/extensions/age_restriction/age_restriction.c +++ b/src/extensions/age_restriction/age_restriction.c @@ -64,8 +64,8 @@ age_restriction_disable ( */ static enum GNUNET_GenericReturnValue age_restriction_load_config ( - struct TALER_Extension *ext, - json_t *jconfig) + const json_t *jconfig, + struct TALER_Extension *ext) { struct TALER_AgeMask mask = {0}; enum GNUNET_GenericReturnValue ret; @@ -93,7 +93,6 @@ age_restriction_load_config ( ext->config = &AR_config; ext->enabled = true; - json_decref (jconfig); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "loaded new age restriction config with age groups: %s\n", diff --git a/src/extensions/extensions.c b/src/extensions/extensions.c index c7d807177..fc361e08c 100644 --- a/src/extensions/extensions.c +++ b/src/extensions/extensions.c @@ -334,12 +334,12 @@ TALER_extensions_load_manifests ( if (critical != extension->critical || 0 != strcmp (version, extension->version) // TODO: libtool compare? || NULL == config - || GNUNET_OK != extension->load_config (NULL, config)) + || GNUNET_OK != extension->load_config (config, NULL)) return GNUNET_SYSERR; /* This _should_ work now */ if (GNUNET_OK != - extension->load_config (extension, config)) + extension->load_config (config, extension)) return GNUNET_SYSERR; extension->enabled = true; |