diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-16 11:36:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-16 11:36:14 +0200 |
commit | b2d9f5936b7e867180199771c9e47c6d95ec8b8a (patch) | |
tree | cfda3db1cf0a6921f88d20925ed74f2cd427fcd6 /src/authorization/anastasis_authorization_plugin_file.c | |
parent | 7bed96f8e479af98db1a8a0c71b7c2ff2dc2b564 (diff) | |
download | anastasis-b2d9f5936b7e867180199771c9e47c6d95ec8b8a.tar.gz anastasis-b2d9f5936b7e867180199771c9e47c6d95ec8b8a.tar.bz2 anastasis-b2d9f5936b7e867180199771c9e47c6d95ec8b8a.zip |
-pass db handle to auth plugins
Diffstat (limited to 'src/authorization/anastasis_authorization_plugin_file.c')
-rw-r--r-- | src/authorization/anastasis_authorization_plugin_file.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_file.c b/src/authorization/anastasis_authorization_plugin_file.c index e8e53a0..38939a0 100644 --- a/src/authorization/anastasis_authorization_plugin_file.c +++ b/src/authorization/anastasis_authorization_plugin_file.c @@ -58,7 +58,7 @@ struct ANASTASIS_AUTHORIZATION_State * * To be possibly used before issuing a 402 payment required to the client. * - * @param cls closure + * @param cls closure with a `const struct ANASTASIS_AuthorizationContext *` * @param connection HTTP client request (for queuing response) * @param truth_mime mime type of @e data * @param data input to validate (i.e. is it a valid phone number, etc.) @@ -77,6 +77,7 @@ file_validate (void *cls, char *filename; bool flag; + (void) cls; if (NULL == data) return GNUNET_NO; filename = GNUNET_STRINGS_data_to_string_alloc (data, @@ -122,6 +123,7 @@ file_start (void *cls, const void *data, size_t data_length) { + const struct ANASTASIS_AuthorizationContext *ac = cls; struct ANASTASIS_AUTHORIZATION_State *as; as = GNUNET_new (struct ANASTASIS_AUTHORIZATION_State); @@ -271,9 +273,11 @@ file_cleanup (struct ANASTASIS_AUTHORIZATION_State *as) void * libanastasis_plugin_authorization_file_init (void *cls) { + const struct ANASTASIS_AuthorizationContext *ac = cls; struct ANASTASIS_AuthorizationPlugin *plugin; plugin = GNUNET_new (struct ANASTASIS_AuthorizationPlugin); + plugin->cls = (void *) ac; plugin->code_validity_period = GNUNET_TIME_UNIT_MINUTES; plugin->code_rotation_period = GNUNET_TIME_UNIT_MINUTES; plugin->code_retransmission_frequency = GNUNET_TIME_UNIT_MINUTES; |