From b2d9f5936b7e867180199771c9e47c6d95ec8b8a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 16 Aug 2021 11:36:14 +0200 Subject: -pass db handle to auth plugins --- src/authorization/anastasis_authorization_plugin_post.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/authorization/anastasis_authorization_plugin_post.c') diff --git a/src/authorization/anastasis_authorization_plugin_post.c b/src/authorization/anastasis_authorization_plugin_post.c index bca4451..dddd273 100644 --- a/src/authorization/anastasis_authorization_plugin_post.c +++ b/src/authorization/anastasis_authorization_plugin_post.c @@ -42,6 +42,12 @@ struct PostContext * Messages of the plugin, read from a resource file. */ json_t *messages; + + /** + * Argument passed to the "init" function of each + * plugin. + */ + const struct ANASTASIS_AuthorizationContext *ac; }; @@ -576,11 +582,13 @@ post_cleanup (struct ANASTASIS_AUTHORIZATION_State *as) void * libanastasis_plugin_authorization_post_init (void *cls) { + const struct ANASTASIS_AuthorizationContext *ac = cls; struct ANASTASIS_AuthorizationPlugin *plugin; - struct GNUNET_CONFIGURATION_Handle *cfg = cls; + const struct GNUNET_CONFIGURATION_Handle *cfg = ac->cfg; struct PostContext *ctx; ctx = GNUNET_new (struct PostContext); + ctx->ac = ac; { char *fn; json_error_t err; -- cgit v1.2.3