aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/exchangedb_accounts.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-20 01:23:02 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-20 01:23:02 +0100
commit8ce6d32f63a81e6ea61971859152e4a5ec3b7c40 (patch)
treea9fbee64baa4a2001bd039dcbcbe2704b13af0a2 /src/exchangedb/exchangedb_accounts.c
parent500a7fe2bb7a5a7c722946fb0c87324e0d8172e8 (diff)
beautification
Diffstat (limited to 'src/exchangedb/exchangedb_accounts.c')
-rw-r--r--src/exchangedb/exchangedb_accounts.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/exchangedb/exchangedb_accounts.c b/src/exchangedb/exchangedb_accounts.c
index aa923c5d3..0081c3283 100644
--- a/src/exchangedb/exchangedb_accounts.c
+++ b/src/exchangedb/exchangedb_accounts.c
@@ -61,7 +61,6 @@ check_for_account (void *cls,
char *method;
char *payto_uri;
char *wire_response_filename;
- struct TALER_EXCHANGEDB_AccountInfo ai;
if (0 != strncasecmp (section,
"exchange-account-",
@@ -93,21 +92,26 @@ check_for_account (void *cls,
"WIRE_RESPONSE",
&wire_response_filename))
wire_response_filename = NULL;
- ai.section_name = section;
- ai.method = method;
- ai.payto_uri = payto_uri;
- ai.wire_response_filename = wire_response_filename;
-
- ai.debit_enabled = (GNUNET_YES ==
- GNUNET_CONFIGURATION_get_value_yesno (ctx->cfg,
- section,
- "ENABLE_DEBIT"));
- ai.credit_enabled = (GNUNET_YES ==
- GNUNET_CONFIGURATION_get_value_yesno (ctx->cfg,
- section,
- "ENABLE_CREDIT"));
- ctx->cb (ctx->cb_cls,
- &ai);
+ {
+ struct TALER_EXCHANGEDB_AccountInfo ai = {
+ .section_name = section,
+ .method = method,
+ .payto_uri = payto_uri,
+ .wire_response_filename = wire_response_filename,
+ .debit_enabled = (GNUNET_YES ==
+ GNUNET_CONFIGURATION_get_value_yesno (
+ ctx->cfg,
+ section,
+ "ENABLE_DEBIT")),
+ .credit_enabled = (GNUNET_YES ==
+ GNUNET_CONFIGURATION_get_value_yesno (ctx->cfg,
+ section,
+ "ENABLE_CREDIT"))
+ };
+
+ ctx->cb (ctx->cb_cls,
+ &ai);
+ }
GNUNET_free (payto_uri);
GNUNET_free (method);
GNUNET_free_non_null (wire_response_filename);
@@ -121,7 +125,6 @@ check_for_account (void *cls,
* @param cb callback to invoke
* @param cb_cls closure for @a cb
*/
-// FIXME(dold): why is this part of the exchange database? Does this really belong here?
void
TALER_EXCHANGEDB_find_accounts (const struct GNUNET_CONFIGURATION_Handle *cfg,
TALER_EXCHANGEDB_AccountCallback cb,