diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-10-08 17:13:57 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-10-08 17:13:57 +0200 |
commit | 4ba07b54e4ea2ac75c408f795cd806409450bc29 (patch) | |
tree | a9fe35d75de203450ea1eb16a83c3f2bcc527c65 /src/extensions/extensions.c | |
parent | d3c509fcd91e5b7e430eda767108d961db196522 (diff) |
WIP: policy_*_fulfiment added and API changes
- policy_fulfilment table defined, handlers added
- policy_details_fulfilment table defined, handlers added
- TALER_extensions_serial_from_policy_details implemened
Diffstat (limited to 'src/extensions/extensions.c')
-rw-r--r-- | src/extensions/extensions.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/extensions/extensions.c b/src/extensions/extensions.c index bf93e9ca..52f9061a 100644 --- a/src/extensions/extensions.c +++ b/src/extensions/extensions.c @@ -354,15 +354,16 @@ TALER_extensions_load_manifests ( enum GNUNET_GenericReturnValue -TALER_extensions_from_policy_details ( +TALER_extensions_serial_from_policy_details ( const json_t *policy_details, - const struct TALER_Extension **extension, + struct GNUNET_HashCode *serial, + struct GNUNET_TIME_Timestamp *deadline, const char **error_hint) { + const struct TALER_Extension *extension; const json_t *jtype; const char *type; - *extension = NULL; *error_hint = NULL; if ((NULL == policy_details) || @@ -386,19 +387,23 @@ TALER_extensions_from_policy_details ( return GNUNET_SYSERR; } - *extension = TALER_extensions_get_by_name (type); - if ((NULL == *extension) || - (NULL == (*extension)->parse_policy_details)) + extension = TALER_extensions_get_by_name (type); + if ((NULL == extension) || + (NULL == extension->parse_policy_details)) { GNUNET_break (0); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unsupported extension policy '%s' requested\n", type); - *extension = NULL; return GNUNET_NO; } - return GNUNET_OK; + *deadline = GNUNET_TIME_UNIT_FOREVER_TS; + return extension->parse_policy_details (policy_details, + serial, + deadline, + error_hint); + } |