diff options
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 | |||
58 | * | 58 | * |
59 | * To be possibly used before issuing a 402 payment required to the client. | 59 | * To be possibly used before issuing a 402 payment required to the client. |
60 | * | 60 | * |
61 | * @param cls closure | 61 | * @param cls closure with a `const struct ANASTASIS_AuthorizationContext *` |
62 | * @param connection HTTP client request (for queuing response) | 62 | * @param connection HTTP client request (for queuing response) |
63 | * @param truth_mime mime type of @e data | 63 | * @param truth_mime mime type of @e data |
64 | * @param data input to validate (i.e. is it a valid phone number, etc.) | 64 | * @param data input to validate (i.e. is it a valid phone number, etc.) |
@@ -77,6 +77,7 @@ file_validate (void *cls, | |||
77 | char *filename; | 77 | char *filename; |
78 | bool flag; | 78 | bool flag; |
79 | 79 | ||
80 | (void) cls; | ||
80 | if (NULL == data) | 81 | if (NULL == data) |
81 | return GNUNET_NO; | 82 | return GNUNET_NO; |
82 | filename = GNUNET_STRINGS_data_to_string_alloc (data, | 83 | filename = GNUNET_STRINGS_data_to_string_alloc (data, |
@@ -122,6 +123,7 @@ file_start (void *cls, | |||
122 | const void *data, | 123 | const void *data, |
123 | size_t data_length) | 124 | size_t data_length) |
124 | { | 125 | { |
126 | const struct ANASTASIS_AuthorizationContext *ac = cls; | ||
125 | struct ANASTASIS_AUTHORIZATION_State *as; | 127 | struct ANASTASIS_AUTHORIZATION_State *as; |
126 | 128 | ||
127 | as = GNUNET_new (struct ANASTASIS_AUTHORIZATION_State); | 129 | as = GNUNET_new (struct ANASTASIS_AUTHORIZATION_State); |
@@ -271,9 +273,11 @@ file_cleanup (struct ANASTASIS_AUTHORIZATION_State *as) | |||
271 | void * | 273 | void * |
272 | libanastasis_plugin_authorization_file_init (void *cls) | 274 | libanastasis_plugin_authorization_file_init (void *cls) |
273 | { | 275 | { |
276 | const struct ANASTASIS_AuthorizationContext *ac = cls; | ||
274 | struct ANASTASIS_AuthorizationPlugin *plugin; | 277 | struct ANASTASIS_AuthorizationPlugin *plugin; |
275 | 278 | ||
276 | plugin = GNUNET_new (struct ANASTASIS_AuthorizationPlugin); | 279 | plugin = GNUNET_new (struct ANASTASIS_AuthorizationPlugin); |
280 | plugin->cls = (void *) ac; | ||
277 | plugin->code_validity_period = GNUNET_TIME_UNIT_MINUTES; | 281 | plugin->code_validity_period = GNUNET_TIME_UNIT_MINUTES; |
278 | plugin->code_rotation_period = GNUNET_TIME_UNIT_MINUTES; | 282 | plugin->code_rotation_period = GNUNET_TIME_UNIT_MINUTES; |
279 | plugin->code_retransmission_frequency = GNUNET_TIME_UNIT_MINUTES; | 283 | plugin->code_retransmission_frequency = GNUNET_TIME_UNIT_MINUTES; |