summaryrefslogtreecommitdiff
path: root/src/authorization/anastasis_authorization_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/authorization/anastasis_authorization_plugin.c')
-rw-r--r--src/authorization/anastasis_authorization_plugin.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/authorization/anastasis_authorization_plugin.c b/src/authorization/anastasis_authorization_plugin.c
index adb1c5b..da28f40 100644
--- a/src/authorization/anastasis_authorization_plugin.c
+++ b/src/authorization/anastasis_authorization_plugin.c
@@ -66,32 +66,25 @@ struct AuthPlugin
*/
char *lib_name;
- /**
- * Cost of using this plugin.
- */
- struct TALER_Amount cost;
};
struct ANASTASIS_AuthorizationPlugin *
ANASTASIS_authorization_plugin_load (
const char *method,
- const struct GNUNET_CONFIGURATION_Handle *AH_cfg,
- struct TALER_Amount *cost)
+ const struct GNUNET_CONFIGURATION_Handle *AH_cfg)
{
struct ANASTASIS_AuthorizationPlugin *authorization;
char *lib_name;
char *sec_name;
struct AuthPlugin *ap;
char *currency;
+ struct TALER_Amount cost;
for (ap = ap_head; NULL != ap; ap = ap->next)
if (0 == strcmp (method,
ap->name))
- {
- *cost = ap->cost;
return ap->authorization;
- }
if (GNUNET_OK !=
TALER_config_get_currency (AH_cfg,
&currency))
@@ -104,7 +97,7 @@ ANASTASIS_authorization_plugin_load (
TALER_config_get_amount (AH_cfg,
sec_name,
"COST",
- &ap->cost))
+ &cost))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
sec_name,
@@ -117,7 +110,7 @@ ANASTASIS_authorization_plugin_load (
if (0 !=
strcasecmp (currency,
- ap->cost.currency))
+ cost.currency))
{
GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
sec_name,
@@ -144,13 +137,13 @@ ANASTASIS_authorization_plugin_load (
GNUNET_free (ap);
return NULL;
}
+ authorization->cost = cost;
ap->name = GNUNET_strdup (method);
ap->lib_name = lib_name;
ap->authorization = authorization;
GNUNET_CONTAINER_DLL_insert (ap_head,
ap_tail,
ap);
- *cost = ap->cost;
return authorization;
}